title: Form not submitting in node js
body: <p>When i am submitting the form nothing takes place.
  No errors are there.
  Its working fine when i am making ajax calls using the server code but its not working as this.
  This is the simple html form i am using.
  And my main.js file on node js .
  Please help me on this.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
              &lt;html&gt;
                &lt;head&gt;
                  &lt;meta charset="utf-8"&gt;
                  &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
                  &lt;meta http-equiv="x-ua-compatible" content="ie=edge"&gt;
                  &lt;title&gt;&lt;/title&gt;
  
                  &lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"&gt;
                &lt;/head&gt;
                &lt;body&gt;
                  &lt;nav class="navbar navbar-default"&gt;
                &lt;div class="container-fluid"&gt;
                  &lt;div class="navbar-header"&gt;
                    &lt;a class="navbar-brand" href="/"&gt;TRAIL APP&lt;/a&gt;
                  &lt;/div&gt;
                  &lt;ul class="nav navbar-nav"&gt;
                    &lt;li class="active"&gt;&lt;a href="/"&gt;Home&lt;/a&gt;&lt;/li&gt;
                    &lt;li&gt;&lt;a href="Page1"&gt;Page 1&lt;/a&gt;&lt;/li&gt;
                    &lt;li&gt;&lt;a href="Page2"&gt;Page 2&lt;/a&gt;&lt;/li&gt;
                  &lt;/ul&gt;
                &lt;/div&gt;
              &lt;/nav&gt;
              &lt;div class="form-group" method='post' action='/user'&gt;
                &lt;label for="usr"&gt;Name:&lt;/label&gt;
                &lt;input type="text" class="form-control" id="usr" name="username"&gt;
              &lt;/div&gt;
              &lt;div class="form-group"&gt;
                &lt;label for="pwd"&gt;Password:&lt;/label&gt;
                &lt;input type="password" class="form-control" id="pwd"&gt;
              &lt;/div&gt;
                  &lt;input type="submit" value="SUBMIT" class="btn-primary" id='select_link' &gt;
  
  
                  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"&gt;
  
  
  
                  &lt;/script&gt;
                  &lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.2/js/bootstrap.min.js" &gt;&lt;/script&gt;
                &lt;/body&gt;
                  &lt;script
                src="https://code.jquery.com/jquery-3.1.1.min.js"
                integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
                crossorigin="anonymous"&gt;
        &lt;/script&gt;
  </code></pre>
  
  <p></p>
  
  <p>And my express-node code is:</p>
  
  <pre><code>var http = require("http");
      var fs=require('fs');
      var express =require('express');
      var  app =express();
      var bodyParser = require('body-parser');
      app.use(bodyParser.urlencoded({ extended: true })); // support encoded bodies
  
  
      app.get('/', function (req, response) {
        var file= fs.createReadStream(__dirname+'/index.html');
  
        file.pipe(response);
      })
      app.get('/Page1', function (req, response) {
        var file= fs.createReadStream(__dirname+'/Page1.html');
  
        file.pipe(response);
        console.log("FIRST PAGE");
      })
      app.get('/Page2', function (req, response) {
        var file= fs.createReadStream(__dirname+'/Page2.html');
  
        file.pipe(response);
        console.log("SECOND PAGE");});
  
  
        app.post('/user', function (req, response) {
          if (!req.body) return response.sendStatus(400)
      console.log(req.body.username) })
  
      app.listen(3000, function () {
        console.log('Example app listening on port 3000!')
      })
  </code></pre>