SlideShare ist ein Scribd-Unternehmen logo
1 von 18
Downloaden Sie, um offline zu lesen
FOR
EVERYTHING
A SHORT STORY BY CHARLIE KEY
charlie@modulus.io - @zwigby
0.6.8
LET YOUR PROCESS
CRASH
$	
  npm	
  install	
  pm2@latest	
  -­‐g
pm2	
  
Modern CLI process manager for Node apps with a
builtin load-balancer
$	
  pm2	
  start	
  app.js
$	
  npm	
  install	
  forever	
  -­‐g
forever	
  
A simple CLI tool for ensuring that a given node
script runs continuously (i.e. forever)
$	
  forever	
  start	
  app.js
FIND ISSUES
node-­‐inspector	
  
Web Inspector based nodeJS debugger
$	
  npm	
  install	
  node-­‐inspector	
  -­‐g
$	
  node-­‐debug	
  app.js
CONGRESS
(API)
APERTURE
(WEBSITE)
FULCRUM
(CLI)
MEDUSA
(DEPLOYMENT MANAGER)
APP HOST
LOAD BALANCER
CUSTOMER APP
INCOMING TRAFFIC
METRICS COLLECTION
npm versioning
"dependencies":	
  {	
  
	
  	
  "express":	
  "*"	
  
}
No	
  Asterisks	
  
Please for the love don’t use asterisks.
Use proper versioning.
"dependencies":	
  {	
  
	
  	
  "express":	
  "4.0"	
  
}
LESSONS LEARNED
stateless	
  
Keep your application as stateless as possible
redis	
  
Great tool if you need to keep state
API
The natural born use case for Node.js
express	
  
Fast, unopinionated, minimalist web framework
hapi	
  
HTTP Server framework - from the minds at Walmart
restify	
  
REST framework
FINAL THOUGHTS
horizontal	
  scalability	
  
Be stateless or have a thought out solution
don’t	
  reinvent	
  the	
  wheel	
  
unless you want to, npm is there for a reason
start	
  testing	
  early	
  
Pick a testing framework and start writing tests
streams	
  
Learn to use them - streams adventure
kiss	
  
Keep it simple stupid
SLIDE OF MANY
THINGS
pm2	
  www.npmjs.org/package/pm2	
  
forever	
  www.npmjs.org/package/forever	
  	
  
node-­‐inspector	
  www.npmjs.org/package/node-­‐inspector	
  
npm	
  semver	
  www.npmjs.org/doc/misc/semver.html	
  
redis	
  redis.io	
  
expressjs	
  expressjs.com	
  
hapi	
  hapijs.com	
  
restify	
  mcavage.me/node-­‐restify	
  
jasmine	
  jasmine.github.io	
  
stream-­‐adventure	
  www.npmjs.org/package/stream-­‐adventure	
  
!
@zwigby

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

A Whale and an Elephant, when PHP meets docker
A Whale and an Elephant, when PHP meets dockerA Whale and an Elephant, when PHP meets docker
A Whale and an Elephant, when PHP meets docker
 
React meets o OCalm
React meets o OCalmReact meets o OCalm
React meets o OCalm
 
Gatling @ Scala.Io 2013
Gatling @ Scala.Io 2013Gatling @ Scala.Io 2013
Gatling @ Scala.Io 2013
 
Asynchronous javascript
 Asynchronous javascript Asynchronous javascript
Asynchronous javascript
 
Serverless in production, an experience report (Going Serverless, 28 Feb 2018)
Serverless in production, an experience report (Going Serverless, 28 Feb 2018)Serverless in production, an experience report (Going Serverless, 28 Feb 2018)
Serverless in production, an experience report (Going Serverless, 28 Feb 2018)
 
Swagger demo
Swagger demoSwagger demo
Swagger demo
 
Debug production server by counter
Debug production server by counterDebug production server by counter
Debug production server by counter
 
2016 05-cloudsoft-amp-and-brooklyn-new
2016 05-cloudsoft-amp-and-brooklyn-new2016 05-cloudsoft-amp-and-brooklyn-new
2016 05-cloudsoft-amp-and-brooklyn-new
 
Click’n’Deploy | SuperSpeakers @CodeCamp Iasi, 2014
Click’n’Deploy | SuperSpeakers @CodeCamp Iasi, 2014Click’n’Deploy | SuperSpeakers @CodeCamp Iasi, 2014
Click’n’Deploy | SuperSpeakers @CodeCamp Iasi, 2014
 
Gatling - Stress test tool
Gatling - Stress test toolGatling - Stress test tool
Gatling - Stress test tool
 
Phone Gap
Phone GapPhone Gap
Phone Gap
 
2020.02.15 DelEx - CI/CD in AWS Cloud
2020.02.15 DelEx - CI/CD in AWS Cloud2020.02.15 DelEx - CI/CD in AWS Cloud
2020.02.15 DelEx - CI/CD in AWS Cloud
 
Universal JavaScript - Frontend United Athens 2017
Universal JavaScript - Frontend United Athens 2017Universal JavaScript - Frontend United Athens 2017
Universal JavaScript - Frontend United Athens 2017
 
CI/CD on Azure Cloud with GoCD
CI/CD on Azure Cloud with GoCD CI/CD on Azure Cloud with GoCD
CI/CD on Azure Cloud with GoCD
 
OSMC 2008 | Lessons in Nagios Learnt From Developing Opsview by Ton Voon
OSMC 2008 | Lessons in Nagios Learnt From Developing Opsview by Ton VoonOSMC 2008 | Lessons in Nagios Learnt From Developing Opsview by Ton Voon
OSMC 2008 | Lessons in Nagios Learnt From Developing Opsview by Ton Voon
 
State in stateless serverless functions
State in stateless serverless functionsState in stateless serverless functions
State in stateless serverless functions
 
Leveraging Micronaut on AWS Lambda
Leveraging Micronaut on AWS LambdaLeveraging Micronaut on AWS Lambda
Leveraging Micronaut on AWS Lambda
 
Performance testing in the cloud webinar jul 2018
Performance testing in the cloud webinar jul 2018Performance testing in the cloud webinar jul 2018
Performance testing in the cloud webinar jul 2018
 
Calling AWS Lambda through Amazon Alexa
Calling AWS Lambda through Amazon AlexaCalling AWS Lambda through Amazon Alexa
Calling AWS Lambda through Amazon Alexa
 
Continuous Delivery
Continuous DeliveryContinuous Delivery
Continuous Delivery
 

Ähnlich wie Node.js Everywhere by @zwigby

Grunt, Gulp & fabs: Build Systems and Development-Workflow for Modern Web-App...
Grunt, Gulp & fabs: Build Systems and Development-Workflow for Modern Web-App...Grunt, Gulp & fabs: Build Systems and Development-Workflow for Modern Web-App...
Grunt, Gulp & fabs: Build Systems and Development-Workflow for Modern Web-App...
Philipp Burgmer
 

Ähnlich wie Node.js Everywhere by @zwigby (20)

I am-one-with-angular
I am-one-with-angularI am-one-with-angular
I am-one-with-angular
 
Hosting Your Own OTA Update Service
Hosting Your Own OTA Update ServiceHosting Your Own OTA Update Service
Hosting Your Own OTA Update Service
 
Haibu: dev deployment is fast and easy again
Haibu: dev deployment is fast and easy againHaibu: dev deployment is fast and easy again
Haibu: dev deployment is fast and easy again
 
Silicon Valley Code Camp 2019 - Reaching the Cloud Native World
Silicon Valley Code Camp 2019 - Reaching the Cloud Native WorldSilicon Valley Code Camp 2019 - Reaching the Cloud Native World
Silicon Valley Code Camp 2019 - Reaching the Cloud Native World
 
Serverless in Production, an experience report (AWS UG South Wales)
Serverless in Production, an experience report (AWS UG South Wales)Serverless in Production, an experience report (AWS UG South Wales)
Serverless in Production, an experience report (AWS UG South Wales)
 
Node Summit 2018: Cloud Native Node.js
Node Summit 2018: Cloud Native Node.jsNode Summit 2018: Cloud Native Node.js
Node Summit 2018: Cloud Native Node.js
 
Serverless in production, an experience report (linuxing in london)
Serverless in production, an experience report (linuxing in london)Serverless in production, an experience report (linuxing in london)
Serverless in production, an experience report (linuxing in london)
 
Introduction to node.js By Ahmed Assaf
Introduction to node.js  By Ahmed AssafIntroduction to node.js  By Ahmed Assaf
Introduction to node.js By Ahmed Assaf
 
Serverless in production, an experience report (Going Serverless)
Serverless in production, an experience report (Going Serverless)Serverless in production, an experience report (Going Serverless)
Serverless in production, an experience report (Going Serverless)
 
CI and CD
CI and CDCI and CD
CI and CD
 
London Node.js User Group - Cloud-native Node.js
London Node.js User Group - Cloud-native Node.jsLondon Node.js User Group - Cloud-native Node.js
London Node.js User Group - Cloud-native Node.js
 
Serverless in production, an experience report
Serverless in production, an experience reportServerless in production, an experience report
Serverless in production, an experience report
 
Serverless in production, an experience report (JeffConf)
Serverless in production, an experience report (JeffConf)Serverless in production, an experience report (JeffConf)
Serverless in production, an experience report (JeffConf)
 
May The Nodejs Be With You
May The Nodejs Be With YouMay The Nodejs Be With You
May The Nodejs Be With You
 
Front matter: Next Level Front End Deployments on OpenShift
Front matter: Next Level Front End Deployments on OpenShiftFront matter: Next Level Front End Deployments on OpenShift
Front matter: Next Level Front End Deployments on OpenShift
 
Serverless in production, an experience report (FullStack 2018)
Serverless in production, an experience report (FullStack 2018)Serverless in production, an experience report (FullStack 2018)
Serverless in production, an experience report (FullStack 2018)
 
Desktop apps with Electron... for fun and profit
Desktop apps with Electron... for fun and profitDesktop apps with Electron... for fun and profit
Desktop apps with Electron... for fun and profit
 
Serverless in production, an experience report (CoDe-Conf)
Serverless in production, an experience report (CoDe-Conf)Serverless in production, an experience report (CoDe-Conf)
Serverless in production, an experience report (CoDe-Conf)
 
Grunt, Gulp & fabs: Build Systems and Development-Workflow for Modern Web-App...
Grunt, Gulp & fabs: Build Systems and Development-Workflow for Modern Web-App...Grunt, Gulp & fabs: Build Systems and Development-Workflow for Modern Web-App...
Grunt, Gulp & fabs: Build Systems and Development-Workflow for Modern Web-App...
 
AWS Lambda from the trenches
AWS Lambda from the trenchesAWS Lambda from the trenches
AWS Lambda from the trenches
 

Kürzlich hochgeladen

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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Kürzlich hochgeladen (20)

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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
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
 
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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
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
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
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
 
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...
 
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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
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
 

Node.js Everywhere by @zwigby

  • 1. FOR EVERYTHING A SHORT STORY BY CHARLIE KEY charlie@modulus.io - @zwigby
  • 2.
  • 3.
  • 4.
  • 5.
  • 7. LET YOUR PROCESS CRASH $  npm  install  pm2@latest  -­‐g pm2   Modern CLI process manager for Node apps with a builtin load-balancer $  pm2  start  app.js $  npm  install  forever  -­‐g forever   A simple CLI tool for ensuring that a given node script runs continuously (i.e. forever) $  forever  start  app.js
  • 8. FIND ISSUES node-­‐inspector   Web Inspector based nodeJS debugger $  npm  install  node-­‐inspector  -­‐g $  node-­‐debug  app.js
  • 9.
  • 10. CONGRESS (API) APERTURE (WEBSITE) FULCRUM (CLI) MEDUSA (DEPLOYMENT MANAGER) APP HOST LOAD BALANCER CUSTOMER APP INCOMING TRAFFIC METRICS COLLECTION
  • 11.
  • 12. npm versioning "dependencies":  {      "express":  "*"   } No  Asterisks   Please for the love don’t use asterisks. Use proper versioning. "dependencies":  {      "express":  "4.0"   }
  • 13. LESSONS LEARNED stateless   Keep your application as stateless as possible redis   Great tool if you need to keep state
  • 14.
  • 15. API The natural born use case for Node.js express   Fast, unopinionated, minimalist web framework hapi   HTTP Server framework - from the minds at Walmart restify   REST framework
  • 16. FINAL THOUGHTS horizontal  scalability   Be stateless or have a thought out solution don’t  reinvent  the  wheel   unless you want to, npm is there for a reason start  testing  early   Pick a testing framework and start writing tests streams   Learn to use them - streams adventure kiss   Keep it simple stupid
  • 17. SLIDE OF MANY THINGS pm2  www.npmjs.org/package/pm2   forever  www.npmjs.org/package/forever     node-­‐inspector  www.npmjs.org/package/node-­‐inspector   npm  semver  www.npmjs.org/doc/misc/semver.html   redis  redis.io   expressjs  expressjs.com   hapi  hapijs.com   restify  mcavage.me/node-­‐restify   jasmine  jasmine.github.io   stream-­‐adventure  www.npmjs.org/package/stream-­‐adventure   !