const express = require('express');
const bodyParser = require('body-parser');

module.exports = function() {
  const app = express();

  app.use(bodyParser.urlencoded({
    extended: true
  }));

  return app;
};


@@ -190,16 +190,547 @@
   %7D));%0A%0A
+  // error handlers%0A%0A  // development error handler%0A  // will print stacktrace%0A  if (app.get('env') === 'development') %7B%0A    app.use(function(err, req, res, next) %7B%0A      res.status(err.status %7C%7C 500);%0A      res.render('error', %7B%0A        message: err.message,%0A        error: err%0A      %7D);%0A    %7D);%0A  %7D%0A%0A  // production error handler%0A  // no stacktraces leaked to user%0A  app.use(function(err, req, res, next) %7B%0A    res.status(err.status %7C%7C 500);%0A    res.render('error', %7B%0A      message: err.message,%0A      error: %7B%7D%0A    %7D);%0A  %7D);%0A  %0A
   return

add express error handlers