Cleanup and minore refactor.

This commit is contained in:
William Welling
2017-03-24 22:36:15 -05:00
parent f51196b4a7
commit bf32f45298
7 changed files with 25 additions and 23 deletions

View File

@@ -64,7 +64,7 @@ app.use(morgan('common', {
function cacheControl(req, res, next) {
// instruct browser to revalidate in 60 seconds
res.header('Cache-Control', 'max-age=60');
res.header('Cache-Control', EnvConfig.cache.control || 'max-age=60');
next();
}
@@ -115,7 +115,7 @@ routes.forEach(route => {
app.get(`/${route}/*`, ngApp);
});
app.get('*', function(req, res) {
app.get('*', function (req, res) {
res.setHeader('Content-Type', 'application/json');
var pojo = { status: 404, message: 'No Content' };
var json = JSON.stringify(pojo, null, 2);