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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user