title: POST value of form via click on submit button (express)
body: <p>I'm getting started with nodejs and express to build a pretty simple app.</p>
  
  <p>So far I'm running a webserver and added an app.get route for my index.html that displays two forms and a submit button.</p>
  
  <p>I'd like to be able to type a string in both forms, click on the submit button and than use both strings on my server (to call a function using those two strings from the forms).</p>
  
  <p><strong>server:</strong></p>
  
  <pre><code>var express = require('express');
  var app = express();
  
  //body-parser -&gt; not sure if thats the right approach...
  var bodyParser = require('body-parser');
  app.use(bodyParser.json());
  
  
   /* servers main page */
   app.get("/", function(req, res) {
      res.sendFile(__dirname + '/index.html');
   });
  
  
  //POST route
  app.post('/', function(req, res) {
  
  
  //goal: user types string in both forms, clicks submit, values are being 
  //received from server to call a function using those strings
  
  
  
  });
  
   var port = process.env.PORT || 1337;
   app.listen(port, function() {
  console.log("Listening on " + port);
   });
  </code></pre>
  
  <p><strong>HTML:</strong></p>
  
  <pre><code>&lt;form action="" method="POST"&gt;
     Subject:&lt;br&gt;
     &lt;input type="text" name="subject" value="default"&gt;&lt;br&gt;
     Message:&lt;br&gt;
     &lt;input type="text" name="message" value="default"&gt;&lt;br&gt;&lt;br&gt;
     &lt;input  type="submit" name="submit" value="Submit"&gt;
  &lt;/form&gt;
  </code></pre>