1
0
mirror of https://github.com/mgerb/mywebsite synced 2026-01-11 18:32:50 +00:00

added blogpost and switched to ejs

This commit is contained in:
2015-07-28 12:49:32 -05:00
parent 103bd39c00
commit 0773f5159d
142 changed files with 11585 additions and 12199 deletions

View File

@@ -6,7 +6,16 @@ var info = mongoose.model('currentdata');
/* GET home page. */
router.get('/', function(req, res, next) {
res.render('index');
var post = req.query.blogpost;
if (post != 'undefined'){
post = 'blogposts/' + post;
}
else {
post = 'blogposts/frontpage';
}
res.render('index', {content : post});
});
router.post('/', function(req, res,next) {