Last active
August 29, 2015 13:56
-
-
Save ramontristani/9203697 to your computer and use it in GitHub Desktop.
Express middleware home routes module
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Router = function(app) { | |
var homeOptions = { | |
title: 'Node.js', | |
subtitle: 'Web Application Development', | |
description: 'An introduction to web application development with Node.js' | |
}; | |
app.get('/', function(req, res) { | |
console.log('Request rendered'); | |
res.render('index', homeOptions); | |
}); | |
app.get('/home', function(req, res) { | |
res.render('index', homeOptions); | |
}); | |
}; | |
module.exports = Router; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment