Download - Create simple api using node js
![Page 1: Create simple api using node js](https://reader037.vdocument.in/reader037/viewer/2022100500/554fb9a4b4c9050e7d8b47b9/html5/thumbnails/1.jpg)
Create Simple API Using NodeJS
Techtalk #32
![Page 2: Create simple api using node js](https://reader037.vdocument.in/reader037/viewer/2022100500/554fb9a4b4c9050e7d8b47b9/html5/thumbnails/2.jpg)
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](https://reader037.vdocument.in/reader037/viewer/2022100500/554fb9a4b4c9050e7d8b47b9/html5/thumbnails/3.jpg)
Success Story
![Page 4: Create simple api using node js](https://reader037.vdocument.in/reader037/viewer/2022100500/554fb9a4b4c9050e7d8b47b9/html5/thumbnails/4.jpg)
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](https://reader037.vdocument.in/reader037/viewer/2022100500/554fb9a4b4c9050e7d8b47b9/html5/thumbnails/5.jpg)
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](https://reader037.vdocument.in/reader037/viewer/2022100500/554fb9a4b4c9050e7d8b47b9/html5/thumbnails/6.jpg)
Application Stack
RESTful API
ExpressJS
Controller
Mongoskin
MongoDB
Key-Value Handler
Memory caching
![Page 7: Create simple api using node js](https://reader037.vdocument.in/reader037/viewer/2022100500/554fb9a4b4c9050e7d8b47b9/html5/thumbnails/7.jpg)
Download
http://nodejs.org/download/
![Page 8: Create simple api using node js](https://reader037.vdocument.in/reader037/viewer/2022100500/554fb9a4b4c9050e7d8b47b9/html5/thumbnails/8.jpg)
package.json
![Page 9: Create simple api using node js](https://reader037.vdocument.in/reader037/viewer/2022100500/554fb9a4b4c9050e7d8b47b9/html5/thumbnails/9.jpg)
Struktur Folder
![Page 10: Create simple api using node js](https://reader037.vdocument.in/reader037/viewer/2022100500/554fb9a4b4c9050e7d8b47b9/html5/thumbnails/10.jpg)
app.js
![Page 11: Create simple api using node js](https://reader037.vdocument.in/reader037/viewer/2022100500/554fb9a4b4c9050e7d8b47b9/html5/thumbnails/11.jpg)
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](https://reader037.vdocument.in/reader037/viewer/2022100500/554fb9a4b4c9050e7d8b47b9/html5/thumbnails/12.jpg)