Commit 9f174cb8 authored by fionera's avatar fionera

Removed deprecated Thingi and changed folder of views

parent 84e76893
exports.index = function (req, res) {
res.render('index', { title: 'Home' })
};
......
......@@ -112,7 +112,7 @@ app.use(bodyParser.json({ extended: true }));
app.use(cookieSession({secret: 'steam-stalker', cookie: {maxAge: 60000}}));
app.use(flash());
app.set(__dirname + '/views');
app.set(path.resolve(__dirname + '/views'));
app.set('view engine', 'jade');
app.disable('x-powered-by');
app.enable('trust proxy');
......@@ -138,11 +138,11 @@ app.get('/api/usercount', function (req, res) {
});
app.get('/api/simple/image', function (req, res) {
if (spaceanswer.state.open == true) {
res.sendfile(path.resolve(__dirname, 'public/img/green.png'));
res.sendFile(path.resolve(__dirname, 'public/img/green.png'));
} else if (spaceanswer.state.open == false) {
res.sendfile(path.resolve(__dirname, 'public/img/red.png'));
res.sendFile(path.resolve(__dirname, 'public/img/red.png'));
} else {
res.sendfile(path.resolve(__dirname, 'public/img/yellow.png'));
res.sendFile(path.resolve(__dirname, 'public/img/yellow.png'));
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment