var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');

var routes = require('./routes/index');
var users = require('./routes/users');

var app = express();

// view engine setup
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'ejs');

// uncomment after placing your favicon in /public
//app.use(favicon(path.join(__dirname, 'public', 'favicon.ico')));
app.use(logger('dev'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
app.use(cookieParser());
app.use(express.static(path.join(__dirname, 'public')));

app.use('/', routes);
app.use('/users', users);

// catch 404 and forward to error handler
app.use(function(req, res, next) {
  var err = new Error('Not Found');
  err.status = 404;
  next(err);
});

// error handlers

// development error handler
// will print stacktrace
if (app.get('env') === 'development') {
  app.use(function(err, req, res, next) {
    res.status(err.status || 500);
    res.render('error', {
      message: err.message,
      error: err
    });
  });
}

// production error handler
// no stacktraces leaked to user
app.use(function(err, req, res, next) {
  res.status(err.status || 500);
  res.render('error', {
    message: err.message,
    error: {}
  });
});


module.exports = app;

@@ -341,88 +341,9 @@
 tup%0A
-app.set('views', path.join(__dirname, 'views'));%0Aapp.set('view engine', 'ejs');
 %0A
+
 %0A// 
@@ -645,16 +645,19 @@
 c')));%0A%0A
+// 
 app.use(
@@ -670,16 +670,19 @@
 outes);%0A
+// 
 app.use(
@@ -699,17 +699,22 @@
 users);%0A
-%0A
+//%0A// 
 // catch
@@ -747,16 +747,19 @@
 handler%0A
+// 
 app.use(
@@ -785,16 +785,19 @@
 next) %7B%0A
+// 
   var er
@@ -824,16 +824,19 @@
 ound');%0A
+// 
   err.st
@@ -847,16 +847,19 @@
  = 404;%0A
+// 
   next(e
@@ -863,21 +863,29 @@
 t(err);%0A
+// 
 %7D);%0A
-%0A
+//%0A// 
 // error
@@ -894,17 +894,22 @@
 andlers%0A
-%0A
+//%0A// 
 // devel
@@ -931,16 +931,19 @@
 ndler%0A//
+ //
  will pr
@@ -957,16 +957,19 @@
 cktrace%0A
+// 
 if (app.
@@ -1000,16 +1000,19 @@
 ent') %7B%0A
+// 
   app.us
@@ -1045,16 +1045,19 @@
 next) %7B%0A
+// 
     res.
@@ -1083,16 +1083,19 @@
 %7C 500);%0A
+// 
     res.
@@ -1108,24 +1108,27 @@
 ('error', %7B%0A
+// 
       messag
@@ -1139,24 +1139,27 @@
 rr.message,%0A
+// 
       error:
@@ -1167,16 +1167,19 @@
 err%0A
+// 
     %7D);%0A
   %7D)
@@ -1178,17 +1178,28 @@
 %7D);%0A
+// 
   %7D);%0A
-%7D%0A%0A
+// %7D%0A//%0A// 
 // p
@@ -1224,16 +1224,19 @@
 ndler%0A//
+ //
  no stac
@@ -1258,16 +1258,19 @@
 to user%0A
+// 
 app.use(
@@ -1301,16 +1301,19 @@
 next) %7B%0A
+// 
   res.st
@@ -1337,16 +1337,19 @@
 %7C 500);%0A
+// 
   res.re
@@ -1364,16 +1364,19 @@
 ror', %7B%0A
+// 
     mess
@@ -1393,16 +1393,19 @@
 essage,%0A
+// 
     erro
@@ -1410,22 +1410,28 @@
 ror: %7B%7D%0A
+// 
   %7D);%0A
+// 
 %7D);%0A%0A%0Amo

remove ejs