client side templates in, fixed home page to parse templates on ajaxify, added footer to the page transition animation for smoothness

This commit is contained in:
psychobunny
2013-04-25 19:13:23 +00:00
parent 7e637a93bb
commit 5173498180
7 changed files with 149 additions and 30 deletions

View File

@@ -57,9 +57,19 @@ var express = require('express'),
app.get('/', function(req, res) {
global.modules.topics.generate_forum_body(function(forum_body) {
res.send(templates['header'] + forum_body + templates['footer']);
})
//res.send(templates['header'] + templates['home'] + templates['footer']);
});
});
app.get('/api/:method', function(req, res) {
switch(req.params.method) {
case 'home' :
global.modules.topics.get(function(data) {
res.send(JSON.stringify(data));
});
break;
default :
res.send('{}');
}
});
app.get('/login', function(req, res) {