text: const express = require('express');
  const path = require('path');
  const cookieParser = require('cookie-parser');
  const bodyParser = require('body-parser');
  const routes = require('./routes/index');
  const app = express();
  
  // View enginer setup
  app.set('views', path.join(__dirname, 'views'));
  app.set('view engine', 'hbs');
  
  // Middleware setup
  app.use(bodyParser.urlencoded({ extended: false }));
  app.use(cookieParser());
  app.use(express.static(path.join(__dirname, 'public')));
  
  // Mount routes
  app.use('/', routes);
  
  // Start server
  var port = process.env.PORT || '3000';
  app.set('port', port);
  app.listen(port, function () {
    console.log('Example app listening on port ' + port);
  });
  