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 lessMiddleware = require('less-middleware');
var mocha = require('mocha');

var app = express();

// routes setup
var index = require('./routes/index');
var users = require('./routes/users');
var portfolio = require('./routes/portfolio');
var showcases = require('./routes/showcases');
var itemData = require('./routes/itemdata');
var collectionData = require('./routes/collectiondata');
var teamData = require('./routes/teamdata');

// middleware setup
app.use(lessMiddleware(__dirname + '/public'));
app.use('/bower_components', express.static(__dirname + '/bower_components'));

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

app.use(favicon(path.join(__dirname, 'public', 'images', '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')));

// views setup
app.use('/', index);
app.use('/users', users);
//app.use('/Works', works);
app.use('/portfolio', portfolio);
app.use('/showcases', showcases);

// set environment
if (app.get('env') === 'development') {
  app.use('/itemdata', itemData);
  app.use('/collectiondata', collectionData);
  app.use('/teamdata', teamData);
}

// 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 handler
app.use(function(err, req, res, next) {
  // set locals, only providing error in development
  res.locals.message = err.message;
  res.locals.error = req.app.get('env') === 'development' ? err : {};

  // render the error page
  res.status(err.status || 500);
  res.render('error');
});

module.exports = app;
@@ -1231,36 +1231,8 @@
 s);%0A
-//app.use('/Works', works);%0A
 app.
@@ -1300,69 +1300,8 @@
 );%0A%0A
-// set environment%0Aif (app.get('env') === 'development') %7B%0A  
 app.
@@ -1324,26 +1324,24 @@
  itemData);%0A
-  
 app.use('/co
@@ -1372,18 +1372,16 @@
 nData);%0A
-  
 app.use(
@@ -1403,18 +1403,16 @@
 amData);
-%0A%7D
 %0A%0A// cat

Update environment