title: express js api end point does not work on azure web app
body: <p>I just tried creating a test api app using Express js. i embraced many ways available on internet to deploy and run node js api app. But nothing is working in my case. Please help me.</p>
  
  <p>Other wise i will have to leave either azure or node js.</p>
  
  <p>I am attaching all the files below:
  1.index.js</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var express = require('express');
  var app = express();
  
  
  router.get('/things', function(req, res) {
      res.json('GET route on things.');
  });
  router.post('/things', function(req, res) {
      res.json('POST route on things.');
  });
  
  app.get('/hello', function(req, res) {
      res.json("Hello World!");
  });
  
  app.post('/hello', function(req, res) {
      res.json("You just called the post method at '/hello'!\n");
  });
  
  const port = process.env.PORT || 1337;
  app.listen(port);</code></pre>
  </div>
  </div>
  
  2.package-lock.json</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>{
      "name": "testabc",
      "version": "1.0.0",
      "description": "test api",
      "main": "index.js",
      "engines": {
          "node": "^7.10.0"
      },
      "scripts": {
          "test": "test",
          "start": "node index.js",
          "prestart": "npm install"
      },
      "repository": {
          "type": "git",
          "url": "none"
      },
      "keywords": [
          "test"
      ],
      "author": "rakesh",
      "license": "ISC",
      "dependencies": {
          "express": "^4.16.2"
      }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>3.package.json</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>{
      "name": "testabc",
      "version": "1.0.0",
      "description": "test api",
      "main": "index.js",
      "engines": {
          "node": "^7.10.0"
      },
      "scripts": {
          "test": "test",
          "start": "node index.js",
          "prestart": "npm install"
      },
      "repository": {
          "type": "git",
          "url": "none"
      },
      "keywords": [
          "test"
      ],
      "author": "rakesh",
      "license": "ISC",
      "dependencies": {
          "express": "^4.16.2"
      }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>4.web.config</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;configuration&gt;
      &lt;system.webServer&gt;
          &lt;handlers&gt;
              &lt;add name="iisnode" path="index.js" verb="*" modules="iisnode" /&gt;
          &lt;/handlers&gt;   
          &lt;rewrite&gt;
        &lt;rules&gt;
          &lt;rule name="myapp"&gt;
            &lt;match url="/*" /&gt;
            &lt;action type="Rewrite" url="index.js" /&gt;
          &lt;/rule&gt;
        &lt;/rules&gt;
      &lt;/rewrite&gt;         
      &lt;/system.webServer&gt;
  &lt;/configuration&gt;</code></pre>
  </div>
  </div>
  </p>