15. Node.js is a platform built on Chrome's
JavaScript runtime for easily building fast,
scalable network applications.
Node.js uses an event-driven, non-blocking I/O
model that makes it lightweight and efficient,
perfect for data-intensive real-time applications
that run across distributed devices.
16. Node.js is a platform built on Chrome's
JavaScript runtime for easily building fast,
scalable network applications.
Node.js uses an event-driven, non-blocking I/O
model that makes it lightweight and efficient,
perfect for data-intensive real-time applications
that run across distributed devices.
49. POST /users
GET /users
GET /users/42
DELETE /users/42
PUT /users/42
POST /blogs
GET /blogs
GET /blogs/42
DELETE /blogs/42
PUT /blogs/42
POST /posts
GET /posts
GET /posts/42
DELETE /posts/42
PUT /posts/42
51. models = [users, blogs, posts]
Object.keys(models).forEach (modelName) ->
app.get "/#{modelName}", (req, res) ->
list models[modelName], (err, data) ->
res.json data
app.get "/#{modelName}/:id", (req, res) ->
get models[modelName], req.params.id, (err, data) ->
res.json data
app.post "/#{modelName}", (req, res) ->
post models[modelName], req.body, (err, data) ->
res.json data
app.del "/#{modelName}/:id", (req, res) ->
del models[modelName], req.parmas.id, (err, count) ->
res.json { count: count }
app.put "/#{modelName}/:id", (req, res) ->
put models[modelName], req.params.id, req.body, (err, count) ->
res.json { count: count }
52. POST /users
GET /users
GET /users/42
DELETE /users/42
PUT /users/42
POST /blogs
GET /blogs
GET /blogs/42
DELETE /blogs/42
PUT /blogs/42
POST /posts
GET /posts
GET /posts/42
DELETE /posts/42
PUT /posts/42
64. ALL CHARACTERS AND
EVENTS IN THIS SHOW--
EVENT THOSE BASED ON REAL
PEOPLE--ARE ENTIRELY FICTIONAL.
ALL CELEBERTY VOICES ARE
IMPERSONATED.....POORLY. THE
FOLLOWING PROGRAM CONTAINS
COARSE LANGUAGE AND DUE TO
ITS CONTENT IT SHOULD NOT BE
VIEWED BE ANYONE