SlideShare uma empresa Scribd logo
1 de 27
SOFTWARE DEVELOPMENT CORPORATION (OSD)
Building a RESTful API
and
Deploy to Cloud
About Me
Sang Cù
Imageware AS
Skype: sangcn
WHY
Build fast
and
Scalable
Success Stories
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/
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
Success Stories
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
Success Stories
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.
Success Stories
Ref: http://www.slideshare.net/joemccann/the-business-case-for-node
CPU Utilization hovered around 1%.
Developers “were bored” that day.
Agenda
 Application Stack
 Deployment Stack
 Configurations
 Routing
 Authentication/Authorization
 Testing
 Deployment
 Monitoring
Application Stack
RESTful API
ExpressJS
Mongoose
MongoDB Memory Caching
Controller
Key-Value Handler
Deployment Stack
Nodejs App
Github
Heroku – Cloud Application Platform
Travis
Configuration
Developing Mode Production Mode
Routing
ExpressJS – Web application framework for Node
Routing
ExpressJS – Web application framework for Node
Authentication
Create a middleware for Expressjs
Testing
Testing
• Config package.json
• make test
• Setup multi testing environment
Process.env.NODE_ENV = “(environment name)”
Testing
Deployment
Demo
Monitoring
NewRelic for Node
Monitoring
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/
SOFTWARE DEVELOPMENT CORPORATION (OSD)

Mais conteúdo relacionado

Mais procurados

Webconf nodejs-production-architecture
Webconf nodejs-production-architectureWebconf nodejs-production-architecture
Webconf nodejs-production-architecture
Ben Lin
 

Mais procurados (20)

Introduction to node.js by jiban
Introduction to node.js by jibanIntroduction to node.js by jiban
Introduction to node.js by jiban
 
Node js (runtime environment + js library) platform
Node js (runtime environment + js library) platformNode js (runtime environment + js library) platform
Node js (runtime environment + js library) platform
 
Node js training (1)
Node js training (1)Node js training (1)
Node js training (1)
 
JavaScript as a Server side language (NodeJS): JSConf 2011, Dhaka
JavaScript as a Server side language (NodeJS): JSConf 2011, DhakaJavaScript as a Server side language (NodeJS): JSConf 2011, Dhaka
JavaScript as a Server side language (NodeJS): JSConf 2011, Dhaka
 
Create Rest API in Nodejs
Create Rest API in Nodejs Create Rest API in Nodejs
Create Rest API in Nodejs
 
Introduction to REST API with Node.js
Introduction to REST API with Node.jsIntroduction to REST API with Node.js
Introduction to REST API with Node.js
 
MEAN stack
MEAN stackMEAN stack
MEAN stack
 
Why NodeJS
Why NodeJSWhy NodeJS
Why NodeJS
 
Introduction to node.js GDD
Introduction to node.js GDDIntroduction to node.js GDD
Introduction to node.js GDD
 
Node.js for beginner
Node.js for beginnerNode.js for beginner
Node.js for beginner
 
Understand How Node.js and Core Features Works
Understand How Node.js and Core Features WorksUnderstand How Node.js and Core Features Works
Understand How Node.js and Core Features Works
 
Webconf nodejs-production-architecture
Webconf nodejs-production-architectureWebconf nodejs-production-architecture
Webconf nodejs-production-architecture
 
Node js projects
Node js projectsNode js projects
Node js projects
 
Nodejs getting started
Nodejs getting startedNodejs getting started
Nodejs getting started
 
Node js Introduction
Node js IntroductionNode js Introduction
Node js Introduction
 
Lazy angular w/ webpack
Lazy angular w/ webpackLazy angular w/ webpack
Lazy angular w/ webpack
 
[Blibli Brown Bag] Nodejs - The Other Side of Javascript
[Blibli Brown Bag] Nodejs - The Other Side of Javascript[Blibli Brown Bag] Nodejs - The Other Side of Javascript
[Blibli Brown Bag] Nodejs - The Other Side of Javascript
 
Node.Js: Basics Concepts and Introduction
Node.Js: Basics Concepts and Introduction Node.Js: Basics Concepts and Introduction
Node.Js: Basics Concepts and Introduction
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
NodeSummit - MEAN Stack
NodeSummit - MEAN StackNodeSummit - MEAN Stack
NodeSummit - MEAN Stack
 

Destaque

Chris Swan ONUG Academy - Container Networks Tutorial
Chris Swan ONUG Academy - Container Networks TutorialChris Swan ONUG Academy - Container Networks Tutorial
Chris Swan ONUG Academy - Container Networks Tutorial
Cohesive Networks
 

Destaque (6)

Introduction to Google API
Introduction to Google APIIntroduction to Google API
Introduction to Google API
 
Chris Swan ONUG Academy - Container Networks Tutorial
Chris Swan ONUG Academy - Container Networks TutorialChris Swan ONUG Academy - Container Networks Tutorial
Chris Swan ONUG Academy - Container Networks Tutorial
 
Introduction to node.js
Introduction to node.jsIntroduction to node.js
Introduction to node.js
 
Chris Swan at Container.Camp: Docker networking
Chris Swan at Container.Camp: Docker networkingChris Swan at Container.Camp: Docker networking
Chris Swan at Container.Camp: Docker networking
 
Docker Networking
Docker NetworkingDocker Networking
Docker Networking
 
7 Stages of Scaling Web Applications
7 Stages of Scaling Web Applications7 Stages of Scaling Web Applications
7 Stages of Scaling Web Applications
 

Semelhante a Nodejs - Building a RESTful API

Service Oriented UI Architecture in the world of web, desktop, & mobile appli...
Service Oriented UI Architecture in the world of web, desktop, & mobile appli...Service Oriented UI Architecture in the world of web, desktop, & mobile appli...
Service Oriented UI Architecture in the world of web, desktop, & mobile appli...
Axway Appcelerator
 

Semelhante a Nodejs - Building a RESTful API (20)

The Business Case for Node.js
The Business Case for Node.jsThe Business Case for Node.js
The Business Case for Node.js
 
Breaking free from monoliths: revolutionizing development with Livewire and S...
Breaking free from monoliths: revolutionizing development with Livewire and S...Breaking free from monoliths: revolutionizing development with Livewire and S...
Breaking free from monoliths: revolutionizing development with Livewire and S...
 
[D2대학생세미나] frontend개발자가 들려주는 개발 이야기
[D2대학생세미나] frontend개발자가 들려주는 개발 이야기[D2대학생세미나] frontend개발자가 들려주는 개발 이야기
[D2대학생세미나] frontend개발자가 들려주는 개발 이야기
 
The automation journey, feedback about the road to Ansible.
The automation journey, feedback about the road to Ansible.The automation journey, feedback about the road to Ansible.
The automation journey, feedback about the road to Ansible.
 
Build Apps Faster With DigitalOcean App Platform
Build Apps Faster With DigitalOcean App PlatformBuild Apps Faster With DigitalOcean App Platform
Build Apps Faster With DigitalOcean App Platform
 
Building for, perceiving and measuring performance for mobile web
Building for, perceiving and measuring performance for mobile webBuilding for, perceiving and measuring performance for mobile web
Building for, perceiving and measuring performance for mobile web
 
Building Rich Applications with Appcelerator
Building Rich Applications with AppceleratorBuilding Rich Applications with Appcelerator
Building Rich Applications with Appcelerator
 
Toronto node js_meetup
Toronto node js_meetupToronto node js_meetup
Toronto node js_meetup
 
Tech Talk: Getting to Know Node.js
Tech Talk: Getting to Know Node.jsTech Talk: Getting to Know Node.js
Tech Talk: Getting to Know Node.js
 
Top Reasons to Use Node.JS Development for Your Next Project
Top Reasons to Use Node.JS Development for Your Next ProjectTop Reasons to Use Node.JS Development for Your Next Project
Top Reasons to Use Node.JS Development for Your Next Project
 
Node js
Node jsNode js
Node js
 
Technology Primer: Monitor Node.js App Performance and the Impact to DevOps w...
Technology Primer: Monitor Node.js App Performance and the Impact to DevOps w...Technology Primer: Monitor Node.js App Performance and the Impact to DevOps w...
Technology Primer: Monitor Node.js App Performance and the Impact to DevOps w...
 
Minor PPT.pptx
Minor PPT.pptxMinor PPT.pptx
Minor PPT.pptx
 
SD Forum Java SIG - Service Oriented UI Architecture
SD Forum Java SIG - Service Oriented UI ArchitectureSD Forum Java SIG - Service Oriented UI Architecture
SD Forum Java SIG - Service Oriented UI Architecture
 
Service Oriented UI Architecture in the world of web, desktop, & mobile appli...
Service Oriented UI Architecture in the world of web, desktop, & mobile appli...Service Oriented UI Architecture in the world of web, desktop, & mobile appli...
Service Oriented UI Architecture in the world of web, desktop, & mobile appli...
 
Running Web & Mobile App on Azure App Service
Running Web & Mobile App on Azure App ServiceRunning Web & Mobile App on Azure App Service
Running Web & Mobile App on Azure App Service
 
BUILD AN EXCELLENT APP WITH NODE.JS DEVELOPMENT COMPANY
BUILD AN EXCELLENT APP WITH NODE.JS DEVELOPMENT COMPANYBUILD AN EXCELLENT APP WITH NODE.JS DEVELOPMENT COMPANY
BUILD AN EXCELLENT APP WITH NODE.JS DEVELOPMENT COMPANY
 
AngularJS + NancyFx + MongoDB = The best trio for ultimate SPA by Bojan Velja...
AngularJS + NancyFx + MongoDB = The best trio for ultimate SPA by Bojan Velja...AngularJS + NancyFx + MongoDB = The best trio for ultimate SPA by Bojan Velja...
AngularJS + NancyFx + MongoDB = The best trio for ultimate SPA by Bojan Velja...
 
SearchLeeds 2019 - Nichola stott - The state of PWAs
SearchLeeds 2019 - Nichola stott - The state of PWAsSearchLeeds 2019 - Nichola stott - The state of PWAs
SearchLeeds 2019 - Nichola stott - The state of PWAs
 
Introduction to Cross-Platform Hybrid Mobile App Development
Introduction to Cross-Platform Hybrid Mobile App DevelopmentIntroduction to Cross-Platform Hybrid Mobile App Development
Introduction to Cross-Platform Hybrid Mobile App Development
 

Último

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Último (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

Nodejs - Building a RESTful API