Merge branch 'master' of git.noarch.de:hardi/opt-cc
commit
88f1d3130b
|
@ -48,19 +48,24 @@ app.use(favicon(path.join(__dirname + '/..', 'public', 'favicon.ico')));
|
||||||
app.use(express.static(path.join(__dirname + '/..', 'public')));
|
app.use(express.static(path.join(__dirname + '/..', 'public')));
|
||||||
app.use(bodyParser.json());
|
app.use(bodyParser.json());
|
||||||
|
|
||||||
// logging
|
|
||||||
if (process.env.NODE_ENV !== config.test.env) {
|
|
||||||
app.use(requestLogger('dev'));
|
|
||||||
}
|
|
||||||
|
|
||||||
// API request checks for API-version and JSON etc.
|
// API request checks for API-version and JSON etc.
|
||||||
app.use(restAPIchecks);
|
app.use(restAPIchecks);
|
||||||
|
|
||||||
|
|
||||||
// Routes ******************************************************
|
// Routes ******************************************************
|
||||||
app.use(urls.auth, authenticateRouter);
|
|
||||||
app.use(urls.signatures, signatureRouter);
|
app.use(urls.signatures, signatureRouter);
|
||||||
|
|
||||||
|
// initialize logging here to exclude /signature requests
|
||||||
|
if (!process.env.NODE_ENV) {
|
||||||
|
// development logging
|
||||||
|
app.use(requestLogger('dev'));
|
||||||
|
} else if (process.env.NODE_ENV !== config.test.env) {
|
||||||
|
// production logging, apache style
|
||||||
|
app.use(requestLogger(':date :remote-addr :method :url :status :response-time ms'));
|
||||||
|
}
|
||||||
|
|
||||||
|
app.use(urls.auth, authenticateRouter);
|
||||||
app.use(urls.overview, overviewRouter);
|
app.use(urls.overview, overviewRouter);
|
||||||
app.use(urls.users, userRouter);
|
app.use(urls.users, userRouter);
|
||||||
app.use(urls.squads, squadRouter);
|
app.use(urls.squads, squadRouter);
|
||||||
|
|
Loading…
Reference in New Issue