Last active
August 29, 2015 14:19
-
-
Save arindampradhan/03f5fef4b16058bd6465 to your computer and use it in GitHub Desktop.
express routing.js
This file contains 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
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