title: Node.js HTTP Server Routing
body: <p>below node.js code is using express to route to different urls, how can I do the same with http instead of express?</p>
  
  <pre><code>var express = require('express');
  var app = express();
  
  app.use(express.static('public'));
  
  app.get('/', function (req, res) {
      res.send('Welcome Home');
  });
  
  app.get('/tcs', function (req, res) {
      res.send('HI RCSer');
  });
  
  
  // Handle 404 - Keep this as a last route
  app.use(function(req, res, next) {
      res.status(404);
      res.send('404: File Not Found');
  });
  
  app.listen(8080, function () {
      console.log('Example app listening on port 8080!');
  });
  </code></pre>