Added some comments for clarification and made the "view cache" disabled with dev environment.

This commit is contained in:
Bram van der Veen 2015-06-23 11:57:09 +02:00
parent cd023fe6f6
commit 688c5dd513

5
web.js
View file

@ -7,9 +7,12 @@ var app = express();
var lookup = require('./lookup');
var schedule = require('./schedule');
//Set up jade rendering engine.
app.set('view engine', 'jade');
app.disable('view cache');
config().env == 'dev' ? app.disable('view cache') : null; //If the environment is set on 'dev' then view cache should be disabled.
app.set('views', __dirname + '/resources/jade');
//Set up all static directories for getting resources.
app.use('/css', less(__dirname + '/resources/less'));
app.use('/js', express.static(__dirname + '/resources/js'));
app.use('/other', express.static(__dirname + '/resources/other'));