Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ivarconr committed Jun 16, 2016
1 parent 2d8fa7e commit 3e9788e
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,22 @@ module.exports = function(config) {
var router = express.Router(); // eslint-disable-line
var baseUriPath = config.baseUriPath || '';

app.use(favicon(__dirname + '/public/favicon.ico'));

app.use(validator([]));

app.set('trust proxy');
app.set('port', config.port);
app.locals.baseUriPath = baseUriPath;
app.use(cookieParser());

app.use(favicon(__dirname + '/public/favicon.ico'));
app.use(validator([]));
app.use(baseUriPath, express.static(__dirname + '/public'));
app.use(bodyParser.json({ strict: false }));
app.use(log4js.connectLogger(logger, {
format: ':remote-addr :status :method :url :response-timems',
level: 'auto' // 3XX=WARN, 4xx/5xx=ERROR
}));

app.set('port', config.port);

app.use(baseUriPath, express.static(__dirname + '/public'));
app.use(bodyParser.json({ strict: false }));

app.use(cookieParser());

// Setup API routes
routes.create(router, config);

app.use(baseUriPath, router);

return app;
Expand Down

0 comments on commit 3e9788e

Please sign in to comment.