var express = require('express');
var mongoose = require('mongoose');
var http = require('http');
var config  = require('./config/config');

require('./config/db')(config);

var app = express();

var modelsPath = __dirname + '/server/models';
require(modelsPath + '/item');
require(modelsPath + '/user');
require(modelsPath + '/request');

require('./config/express')(app, config);
require('./config/routes')(app);

app.use('/api', require('./config/routes'));

app.listen(config.port, config.host);

console.log('App started on port '+ config.port);

module.exports = app;
@@ -67,36 +67,8 @@
 ');%0A
-var http = require('http');%0A
 var 
@@ -385,54 +385,8 @@
 );%0A%0A
-app.use('/api', require('./config/routes'));%0A%0A
 app.

remove more dead code