Skip to content

Instantly share code, notes, and snippets.

@ramontristani
Last active August 29, 2015 13:56
Show Gist options
  • Save ramontristani/9203697 to your computer and use it in GitHub Desktop.
Save ramontristani/9203697 to your computer and use it in GitHub Desktop.
Express middleware home routes module
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