Skip to content

Instantly share code, notes, and snippets.

@arindampradhan
Last active August 29, 2015 14:19
Show Gist options
  • Save arindampradhan/03f5fef4b16058bd6465 to your computer and use it in GitHub Desktop.
Save arindampradhan/03f5fef4b16058bd6465 to your computer and use it in GitHub Desktop.
express routing.js
var express = require('express');
var app = express();
var router = express.Router();
app.set('view','./views');
app.set('view engine', 'jade');
app.get('/',function (req,res) {
res.render('index',{title:"Hey",message:"Hello There!"})
});
var server = app.listen(3000,function () {
var host = server.address().address;
var port = server.address().port;
console.log('App listening at http://%s:%s',host,port);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment