Your SlideShare is downloading. ×
Nodejs - Building a RESTful API
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Nodejs - Building a RESTful API

333
views

Published on

Published in: Technology

0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
333
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
13
Comments
0
Likes
5
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. SOFTWARE DEVELOPMENT CORPORATION (OSD) Building a RESTful API and Deploy to Cloud
  • 2. About Me Sang Cù Imageware AS Skype: sangcn
  • 3. WHY Build fast and Scalable
  • 4. Success Stories
  • 5. Success Stories Built a Node version of a Java app half the time with fewer developers to Ref: https://www.paypal-engineering.com/2013/11/22/node-js-at-paypal/
  • 6. Success Stories “Velocity was the key driving point for PayPal's move to Node. We found it enabled a huge boost to our workflow allowing us to iterate faster and innovate more.” –Jeff Harrel, Director of User Interface Engineering
  • 7. Success Stories
  • 8. Success Stories Easily serving 50,000 requests/minute Handling the same amount of traffic as before but with less hardware. Ref: http://www.slideshare.net/joemccann/the-business-case-for-node
  • 9. Success Stories
  • 10. Success Stories Ref: http://www.slideshare.net/joemccann/the-business-case-for-node 55% of all traffic on Black Friday went to Node servers. Not a single Node server went down. Zero.
  • 11. Success Stories Ref: http://www.slideshare.net/joemccann/the-business-case-for-node CPU Utilization hovered around 1%. Developers “were bored” that day.
  • 12. Agenda  Application Stack  Deployment Stack  Configurations  Routing  Authentication/Authorization  Testing  Deployment  Monitoring
  • 13. Application Stack RESTful API ExpressJS Mongoose MongoDB Memory Caching Controller Key-Value Handler
  • 14. Deployment Stack Nodejs App Github Heroku – Cloud Application Platform Travis
  • 15. Configuration Developing Mode Production Mode
  • 16. Routing ExpressJS – Web application framework for Node
  • 17. Routing ExpressJS – Web application framework for Node
  • 18. Authentication Create a middleware for Expressjs
  • 19. Testing
  • 20. Testing • Config package.json • make test • Setup multi testing environment Process.env.NODE_ENV = “(environment name)”
  • 21. Testing
  • 22. Deployment Demo
  • 23. Monitoring NewRelic for Node
  • 24. Monitoring
  • 25. Reference 1. Nodejs - http://nodejs.org/ 2. Expressjs - http://expressjs.com/ 3. MongoDB - https://www.mongodb.org/ 4. Mongoose –mongoosejs.com 5. Request - https://www.npmjs.org/package/request 6. Es6-Promise - https://www.npmjs.org/package/es6-promise 7. NewRelic - http://newrelic.com/application-monitoring 8. Travis CI - https://travis-ci.org/ 9. Heroku Cloud - https://www.heroku.com/
  • 26. SOFTWARE DEVELOPMENT CORPORATION (OSD)