Added lots of web interface related stuff for external plugin

This commit is contained in:
Daniel Vestøl committed 2018-06-06 21:33:08 +02:00
1 parent 17b5967b0f
commit 034db54152
4 files changed
+66 -33

No files matched your search

+8 -3
View File
@@ -83,10 +83,15 @@ app.set('views', path.join(__dirname, 'static'));
app.set('view engine', 'html');
app.engine('html', ejs.renderFile);
var routes = require("./routes.js");
routes(app);
// give ejs access to some interesting information
app.use(function(req, res, next){
res.locals.res = res;
res.locals.req = req;
res.locals.masterPlugins = masterPlugins;
next();
});
require("./routes.js")(app);
// Set folder to serve static content from (the website)
app.use(express.static('static'));
// mod downloads