Node.js
With WebMatrix
Node.js
“ Built on V8 JavaScript runtime,
Perfect for data-intensive real-time
applications ”

http://nodejs.org/
Express.js
“ Web application framework for node.js ”

http://expressjs.com
Jade
“ Node template Engine ”

http://jade-lang.com/
“a free, lightweight, cloud-connected web development
tool”

http://www.microsoft.com/web/webmatrix/
Start
Routs
routes = require('./routes')
user = require('./routes/user')

app.get('/', routes.index); http://localhost/
app.get('/users', user.list); http://localhost/users
app.get('/users/:user', user.profile); http://localhost/users/bill
app.get('/users/:user/pics', user.media);
http://localhost/users/bill/pics
Controller
user.js
exports.profile = function(req, res){
res.render('profile',
{
title: 'Profile',
username: req.params.user
}
);
}; // get('/users/:user',user.profile)
View
profile.jade

extends layout
block content
h1= title
p This is #{username}'s profile
App Source:
https://github.com/agentmilindu/simple-Node.js-app.git

By Milindu Sanoj Kumarage
agentmilindu@gmail.com
@agentmilindu
lk.linkedin.com/in/agentmilindu/

Node.js with WebMatrix