add res.respond, fix linting

This commit is contained in:
Matteo Pagliazzi
2015-11-23 13:01:47 +01:00
parent a26f713e18
commit 349122c9a1
7 changed files with 14 additions and 4 deletions

View File

@@ -8,6 +8,7 @@ import routes from '../../libs/api-v3/setupRoutes';
import notFoundHandler from './notFound';
import nconf from 'nconf';
import morgan from 'morgan';
import responseHandler from './response';
const IS_PROD = nconf.get('IS_PROD');
const DISABLE_LOGGING = nconf.get('DISABLE_REQUEST_LOGGING');
@@ -22,6 +23,7 @@ export default function attachMiddlewares (app) {
app.use(bodyParser.json());
app.use(expressValidator()); // TODO config
app.use(analytics);
app.use(responseHandler);
app.use(getUserLanguage);
app.use('/api/v3', routes);