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(...
Controller
user.js
exports.profile = function(req, res){
res.render('profile',
{
title: 'Profile',
username: req.params.us...
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
@agen...
Upcoming SlideShare
Loading in …5
×

Node.js with WebMatrix

643 views
610 views

Published on

Simple introduction to Node.js app building

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
643
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
7
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Node.js with WebMatrix

  1. 1. Node.js With WebMatrix
  2. 2. Node.js “ Built on V8 JavaScript runtime, Perfect for data-intensive real-time applications ” http://nodejs.org/
  3. 3. Express.js “ Web application framework for node.js ” http://expressjs.com
  4. 4. Jade “ Node template Engine ” http://jade-lang.com/
  5. 5. “a free, lightweight, cloud-connected web development tool” http://www.microsoft.com/web/webmatrix/
  6. 6. Start
  7. 7. 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
  8. 8. Controller user.js exports.profile = function(req, res){ res.render('profile', { title: 'Profile', username: req.params.user } ); }; // get('/users/:user',user.profile)
  9. 9. View profile.jade extends layout block content h1= title p This is #{username}'s profile
  10. 10. App Source: https://github.com/agentmilindu/simple-Node.js-app.git By Milindu Sanoj Kumarage agentmilindu@gmail.com @agentmilindu lk.linkedin.com/in/agentmilindu/

×