create simple api using node js

13

Click here to load reader

Upload: edwin-andrianto

Post on 11-May-2015

232 views

Category:

Technology


4 download

DESCRIPTION

Create simpele api using express and mongoskin.

TRANSCRIPT

Page 1: Create simple api using node js

Create Simple API Using NodeJS

Techtalk #32

Page 2: Create simple api using node js

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.

- nodejs.org

Page 3: Create simple api using node js

Success Story

Page 4: Create simple api using node js

Half the time with fewer

developers

to

Built a Node Version of a Java app

https://www.paypal-engineering.com/2013/11/22/node-js-at-paypal/

Page 5: Create simple api using node js

Easly serving 50,000 request/minute

Handling the same amount of traffic as before

but with less hardware

http://slideshare.net/joemccann/the-business-case-for-node

Page 6: Create simple api using node js

Application Stack

RESTful API

ExpressJS

Controller

Mongoskin

MongoDB

Key-Value Handler

Memory caching

Page 7: Create simple api using node js

Download

http://nodejs.org/download/

Page 8: Create simple api using node js

package.json

Page 9: Create simple api using node js

Struktur Folder

Page 10: Create simple api using node js

app.js

Page 11: Create simple api using node js

Route HTTP Verb Desc

/api/takjil GET Get all takjil

/api/takjil POST Create takjil

/api/takjil/:id GET Get single takjil

/api/takjil/:id PUT Update a takjil info

/api/takjil/:id DELETE Delete a takjil

Routes

Page 12: Create simple api using node js
Page 13: Create simple api using node js

https://github.com/drieanto/nodejs-api