mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 03:55:55 +01:00
Merge branch 'master' of github.com:psychobunny/node-forum
This commit is contained in:
@@ -7,19 +7,30 @@ var express = require('express'),
|
||||
(function(app) {
|
||||
var templates = global.templates;
|
||||
|
||||
function refreshTemplates() {
|
||||
//need a better solution than copying this code on every call. is there an "onconnect" event?
|
||||
if (DEVELOPMENT === true) {
|
||||
// refreshing templates
|
||||
modules.templates.init();
|
||||
}
|
||||
}
|
||||
app.get('/', function(req, res) {
|
||||
refreshTemplates();
|
||||
res.send(templates['header'] + templates['home'] + templates['footer']);
|
||||
});
|
||||
|
||||
app.get('/login', function(req, res) {
|
||||
refreshTemplates();
|
||||
res.send(templates['header'] + templates['login'] + templates['footer']);
|
||||
});
|
||||
|
||||
app.get('/reset', function(req, res) {
|
||||
refreshTemplates();
|
||||
res.send(templates['header'] + templates['reset'] + templates['footer']);
|
||||
});
|
||||
|
||||
app.get('/register', function(req, res) {
|
||||
refreshTemplates();
|
||||
res.send(templates['header'] + templates['register'] + templates['footer']);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user