latest changes

This commit is contained in:
Dobie Wollert
2014-12-15 02:36:41 -05:00
parent b35bb3f1d5
commit 966152a631
57 changed files with 6842 additions and 42 deletions

25
app/controllers/site.js Normal file
View File

@ -0,0 +1,25 @@
var mongoose = require('mongoose'),
Post = mongoose.model('Post');
module.exports = function(piler) {
return {
index: function(req, res, next) {
host = String(req.headers['x-forwarded-host']);
host = host.split(':')[0];
if (host != 'site.atlb.co') {
return next();
}
if (!req.user) {
req.session.redirectUrl = req.url
}
var path = req.path.slice(1);
res.render('site.jade', {
css: piler.css.renderTags()
});
}
}
}