SlideShare a Scribd company logo
Node.js Getting Started &
Best Practices
Charlotte Bots and AI Meetup –
January 2017
Introduction
Ramu Pulipati
botsplash.com
Conversational bots for News media & verticals
botsplash.com
Agenda
• Getting Started
– Basics
– Development Tools
– Features
– Challenges
• Best Practices
– Working with Node
– Common Mistakes
– Deployment & Monitoring
Basics
• What is it? Javascript Runtime
• Created by Ryan Dhal in 2009 and managed by
Node.js foundation
• Early adopters:
– Walmart, Netflix, Microsoft, LinkedIn, Paypal,
ebay, Facebook, NY Times, Uber, Many Startups
When to use
• Why use it?
– Easy to get started, learn and deploy
– Can build variety of applications
– Lots of open source packages and strong community
– Excellent performance (if done correctly)
– Javascript is everywhere. Talent pool.
• When NOT to use it?
– Compute =intensive tasks
– Need multiple threads/processes communication
– Strongly Typed Language* (Flow & TypeScript could
considered)
Applications
• Web applications (front end + server side)
• REST APIs
• Real-time applications/Web sockets (Socket.io)
• Mobile Apps (React Native)
• Desktop development (Electron)
• Chatbots (Slack, Facebook)
• Web crawlers (Cheerio)
• Internet of Things
• Command line tools
Development Tools
• Getting Started
– NVM for development
– Use platform binary or compile source for prod
• Editor Choices & Plugins
– Atom Editor with Nuclide plugin
– Visual Studio Code (for MS devs)
• Debugging
Using good tools/packages and practices will help build better code and less
frustration/errors with interpreted code
Node.js Features
• Node Event Loop
• Module system
• Event Emitter
• API for file system, sockets and processes
• Clustering
• ES5, ES6 and ES7 support: http://node.green/
NPM
• Node Package Manager (installed with node)
• Getting started commands
– npm init
– npm –save or npm –save-dev
– npm install
– gulp/grunt
– npm start
Challenges
• Interpreted code is a trap for large projects
• Multiple way to things (see screen)
• Everyday a new package is popular
BEST PRACTICES
Working with Node.js
• Project structure & npm link
• Lint your code & follow style guide
• Use Types – Flow vs TypeScript
• Nodemon, gulp, grunt and webpack
• Write tests for reusing code
• Debugging using node-inspector
Common Mistakes
• Using new operator
• Callbacks, Promises, Async/Await
• Code refactoring
• Large code base
• Handle errors – try/catch, promises
Alternatives to Callback
Must Have Packages
Package Purpose
momentjs Defacto datetime library
lodash Defacto collections library
request/fetch/axios Web client – REST and HTTP
bluebird/async Defacto Promise library
passport Web Authentication
sequelize Defacto ORM
dotenv Load environment variables
Winston Defacto Logging
eslint/babel Code linting
gulp/grunt Task/build manager
express/restify/sails/hel
met
Web applications
nodemailer Email
Deployment and Monitoring
• Prod deployment using Clustering or PM2
• Deployment: Nginx or Heroku or AWS Lambda
• Nginx is setup as reverse proxy
• Use papertrial or loggly or newrelic for log
monitoring
• Upgrading version (wait for 6 months)
Further Reading
• Javascript – The good parts
• NVM: https://github.com/creationix/nvm &
https://github.com/coreybutler/nvm-windows
• Style guide - https://github.com/airbnb/javascript
• Node.js support: http://node.green
• Web frameworks:
http://www.tothenew.com/blog/10-powerful-
node-js-frameworks-for-web-application-
development/
Ad

More Related Content

What's hot (20)

Brief Intro to Phoenix - Elixir Meetup at BukaLapak
Brief Intro to Phoenix - Elixir Meetup at BukaLapakBrief Intro to Phoenix - Elixir Meetup at BukaLapak
Brief Intro to Phoenix - Elixir Meetup at BukaLapak
Riza Fahmi
 
MEAN Stack - Google Developers Live 10/03/2013
MEAN Stack - Google Developers Live 10/03/2013MEAN Stack - Google Developers Live 10/03/2013
MEAN Stack - Google Developers Live 10/03/2013
Valeri Karpov
 
Don't worry with bower
Don't worry with bowerDon't worry with bower
Don't worry with bower
Frank van der Linden
 
SGCE 2015 REST APIs
SGCE 2015 REST APIsSGCE 2015 REST APIs
SGCE 2015 REST APIs
Domingo Suarez Torres
 
Realtime MVC with Sails.js
Realtime MVC with Sails.jsRealtime MVC with Sails.js
Realtime MVC with Sails.js
Serdar Dogruyol
 
Intro to Node.js
Intro to Node.jsIntro to Node.js
Intro to Node.js
Jamal Sinclair O'Garro
 
The JavaScript Delusion
The JavaScript DelusionThe JavaScript Delusion
The JavaScript Delusion
JUGBD
 
WordPress Development Environments
WordPress Development EnvironmentsWordPress Development Environments
WordPress Development Environments
Josh Cummings
 
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Conference
 
Florian Koch - Monitoring CoreOS with Zabbix
Florian Koch - Monitoring CoreOS with ZabbixFlorian Koch - Monitoring CoreOS with Zabbix
Florian Koch - Monitoring CoreOS with Zabbix
Zabbix
 
Using Zabbix API from Drupal
Using Zabbix API from DrupalUsing Zabbix API from Drupal
Using Zabbix API from Drupal
Ricardo Santos
 
Next generation frontend tooling
Next generation frontend toolingNext generation frontend tooling
Next generation frontend tooling
pksjce
 
DevDay 2018 - Blazor
DevDay 2018 - BlazorDevDay 2018 - Blazor
DevDay 2018 - Blazor
Denis Voituron
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
Edy Segura
 
NodeSummit - MEAN Stack
NodeSummit - MEAN StackNodeSummit - MEAN Stack
NodeSummit - MEAN Stack
Valeri Karpov
 
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...
Bojan Veljanovski
 
Untangling spring week12
Untangling spring week12Untangling spring week12
Untangling spring week12
Derek Jacoby
 
Node.JS and WebSockets with Faye
Node.JS and WebSockets with FayeNode.JS and WebSockets with Faye
Node.JS and WebSockets with Faye
Matjaž Lipuš
 
Troubleshooting Node.js
Troubleshooting Node.jsTroubleshooting Node.js
Troubleshooting Node.js
Igor Soarez
 
Blazor - The New Silverlight?
Blazor - The New Silverlight?Blazor - The New Silverlight?
Blazor - The New Silverlight?
Christian Nagel
 
Brief Intro to Phoenix - Elixir Meetup at BukaLapak
Brief Intro to Phoenix - Elixir Meetup at BukaLapakBrief Intro to Phoenix - Elixir Meetup at BukaLapak
Brief Intro to Phoenix - Elixir Meetup at BukaLapak
Riza Fahmi
 
MEAN Stack - Google Developers Live 10/03/2013
MEAN Stack - Google Developers Live 10/03/2013MEAN Stack - Google Developers Live 10/03/2013
MEAN Stack - Google Developers Live 10/03/2013
Valeri Karpov
 
Realtime MVC with Sails.js
Realtime MVC with Sails.jsRealtime MVC with Sails.js
Realtime MVC with Sails.js
Serdar Dogruyol
 
The JavaScript Delusion
The JavaScript DelusionThe JavaScript Delusion
The JavaScript Delusion
JUGBD
 
WordPress Development Environments
WordPress Development EnvironmentsWordPress Development Environments
WordPress Development Environments
Josh Cummings
 
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Conference
 
Florian Koch - Monitoring CoreOS with Zabbix
Florian Koch - Monitoring CoreOS with ZabbixFlorian Koch - Monitoring CoreOS with Zabbix
Florian Koch - Monitoring CoreOS with Zabbix
Zabbix
 
Using Zabbix API from Drupal
Using Zabbix API from DrupalUsing Zabbix API from Drupal
Using Zabbix API from Drupal
Ricardo Santos
 
Next generation frontend tooling
Next generation frontend toolingNext generation frontend tooling
Next generation frontend tooling
pksjce
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
Edy Segura
 
NodeSummit - MEAN Stack
NodeSummit - MEAN StackNodeSummit - MEAN Stack
NodeSummit - MEAN Stack
Valeri Karpov
 
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...
Bojan Veljanovski
 
Untangling spring week12
Untangling spring week12Untangling spring week12
Untangling spring week12
Derek Jacoby
 
Node.JS and WebSockets with Faye
Node.JS and WebSockets with FayeNode.JS and WebSockets with Faye
Node.JS and WebSockets with Faye
Matjaž Lipuš
 
Troubleshooting Node.js
Troubleshooting Node.jsTroubleshooting Node.js
Troubleshooting Node.js
Igor Soarez
 
Blazor - The New Silverlight?
Blazor - The New Silverlight?Blazor - The New Silverlight?
Blazor - The New Silverlight?
Christian Nagel
 

Viewers also liked (17)

Raddoppiare il Fatturato
Raddoppiare il FatturatoRaddoppiare il Fatturato
Raddoppiare il Fatturato
Stefano Salvadori
 
Career advice for beginner software engineers
Career advice for beginner software engineersCareer advice for beginner software engineers
Career advice for beginner software engineers
botsplash.com
 
CHANTI RESUME 1
CHANTI RESUME 1CHANTI RESUME 1
CHANTI RESUME 1
krishnakanth kesava
 
ARTE ESENCIAL
ARTE ESENCIAL ARTE ESENCIAL
ARTE ESENCIAL
lopez1230
 
Plantilla icontec (1)
Plantilla icontec (1)Plantilla icontec (1)
Plantilla icontec (1)
angie bernal jimenez
 
resident evil filmes
resident evil filmesresident evil filmes
resident evil filmes
igor campos
 
P7 e2 alfredopardo
P7 e2 alfredopardoP7 e2 alfredopardo
P7 e2 alfredopardo
alfredo pardo
 
El profesor ideal
El profesor idealEl profesor ideal
El profesor ideal
Claudia Djekki
 
Mehul Desai Resume_2016
Mehul Desai Resume_2016Mehul Desai Resume_2016
Mehul Desai Resume_2016
Mehul Desai
 
media pembelajaran berbasis web
media pembelajaran berbasis webmedia pembelajaran berbasis web
media pembelajaran berbasis web
rubhang babo
 
Workplace by facebook
Workplace by facebookWorkplace by facebook
Workplace by facebook
Estefanía Marchán Criado
 
Caruso_Christopher_Resume
Caruso_Christopher_ResumeCaruso_Christopher_Resume
Caruso_Christopher_Resume
Christopher Caruso
 
Plantilla icontec
Plantilla icontecPlantilla icontec
Plantilla icontec
angie bernal jimenez
 
AI Use Cases discussion
AI Use Cases discussionAI Use Cases discussion
AI Use Cases discussion
botsplash.com
 
Estonia E-Residency: Country as a Service - BigchainDB & IPDB Meetup #3 - Fe...
Estonia E-Residency: Country as a Service  - BigchainDB & IPDB Meetup #3 - Fe...Estonia E-Residency: Country as a Service  - BigchainDB & IPDB Meetup #3 - Fe...
Estonia E-Residency: Country as a Service - BigchainDB & IPDB Meetup #3 - Fe...
BigchainDB
 
COALA IP: a blockchain-ready Intellectual property licensing protocol - Bigch...
COALA IP: a blockchain-ready Intellectual property licensing protocol - Bigch...COALA IP: a blockchain-ready Intellectual property licensing protocol - Bigch...
COALA IP: a blockchain-ready Intellectual property licensing protocol - Bigch...
BigchainDB
 
Blockchain Beyond Finance - Cronos Groep - Jan 17, 2017
 Blockchain Beyond Finance - Cronos Groep - Jan 17, 2017 Blockchain Beyond Finance - Cronos Groep - Jan 17, 2017
Blockchain Beyond Finance - Cronos Groep - Jan 17, 2017
BigchainDB
 
Career advice for beginner software engineers
Career advice for beginner software engineersCareer advice for beginner software engineers
Career advice for beginner software engineers
botsplash.com
 
ARTE ESENCIAL
ARTE ESENCIAL ARTE ESENCIAL
ARTE ESENCIAL
lopez1230
 
resident evil filmes
resident evil filmesresident evil filmes
resident evil filmes
igor campos
 
Mehul Desai Resume_2016
Mehul Desai Resume_2016Mehul Desai Resume_2016
Mehul Desai Resume_2016
Mehul Desai
 
media pembelajaran berbasis web
media pembelajaran berbasis webmedia pembelajaran berbasis web
media pembelajaran berbasis web
rubhang babo
 
AI Use Cases discussion
AI Use Cases discussionAI Use Cases discussion
AI Use Cases discussion
botsplash.com
 
Estonia E-Residency: Country as a Service - BigchainDB & IPDB Meetup #3 - Fe...
Estonia E-Residency: Country as a Service  - BigchainDB & IPDB Meetup #3 - Fe...Estonia E-Residency: Country as a Service  - BigchainDB & IPDB Meetup #3 - Fe...
Estonia E-Residency: Country as a Service - BigchainDB & IPDB Meetup #3 - Fe...
BigchainDB
 
COALA IP: a blockchain-ready Intellectual property licensing protocol - Bigch...
COALA IP: a blockchain-ready Intellectual property licensing protocol - Bigch...COALA IP: a blockchain-ready Intellectual property licensing protocol - Bigch...
COALA IP: a blockchain-ready Intellectual property licensing protocol - Bigch...
BigchainDB
 
Blockchain Beyond Finance - Cronos Groep - Jan 17, 2017
 Blockchain Beyond Finance - Cronos Groep - Jan 17, 2017 Blockchain Beyond Finance - Cronos Groep - Jan 17, 2017
Blockchain Beyond Finance - Cronos Groep - Jan 17, 2017
BigchainDB
 
Ad

Similar to Node.js Getting Started &amd Best Practices (20)

After the LAMP, it's time to get MEAN
After the LAMP, it's time to get MEANAfter the LAMP, it's time to get MEAN
After the LAMP, it's time to get MEAN
Jeff Fox
 
The MEAN Stack
The MEAN StackThe MEAN Stack
The MEAN Stack
Md. Ziaul Haq
 
Introduction To Web Development & The New Digital Workplace
Introduction To Web Development & The New Digital WorkplaceIntroduction To Web Development & The New Digital Workplace
Introduction To Web Development & The New Digital Workplace
Jen Wei Lee
 
Exploring Ruby on Rails and PostgreSQL
Exploring Ruby on Rails and PostgreSQLExploring Ruby on Rails and PostgreSQL
Exploring Ruby on Rails and PostgreSQL
Barry Jones
 
Meetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech PeopleMeetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech People
IT Arena
 
Be faster then rabbits
Be faster then rabbitsBe faster then rabbits
Be faster then rabbits
Vladislav Bauer
 
Hello world - intro to node js
Hello world - intro to node jsHello world - intro to node js
Hello world - intro to node js
Refresh Annapolis Valley
 
Kiss.ts - The Keep It Simple Software Stack for 2017++
Kiss.ts - The Keep It Simple Software Stack for 2017++Kiss.ts - The Keep It Simple Software Stack for 2017++
Kiss.ts - The Keep It Simple Software Stack for 2017++
Ethan Ram
 
Google App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGoogle App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and Gaelyk
Guillaume Laforge
 
DEV117 - Unleash the Power of the AppDev Pack and Node.js in Domino
DEV117 - Unleash the Power of the AppDev Pack and Node.js in DominoDEV117 - Unleash the Power of the AppDev Pack and Node.js in Domino
DEV117 - Unleash the Power of the AppDev Pack and Node.js in Domino
Heiko Voigt
 
QEWD.js: Have your Node.js Cake and Eat It Too
QEWD.js: Have your Node.js Cake and Eat It TooQEWD.js: Have your Node.js Cake and Eat It Too
QEWD.js: Have your Node.js Cake and Eat It Too
Rob Tweed
 
Node.js, for architects - OpenSlava 2013
Node.js, for architects - OpenSlava 2013Node.js, for architects - OpenSlava 2013
Node.js, for architects - OpenSlava 2013
Oscar Renalias
 
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
Heiko Voigt
 
From Java to Ruby...and Back
From Java to Ruby...and BackFrom Java to Ruby...and Back
From Java to Ruby...and Back
Anil Hemrajani
 
APIs distribuidos con alta escalabilidad
APIs distribuidos con alta escalabilidadAPIs distribuidos con alta escalabilidad
APIs distribuidos con alta escalabilidad
Software Guru
 
Recon-Fu @BsidesKyiv 2016
Recon-Fu @BsidesKyiv 2016Recon-Fu @BsidesKyiv 2016
Recon-Fu @BsidesKyiv 2016
Vlad Styran
 
Tech Thursdays: Building Products
Tech Thursdays: Building ProductsTech Thursdays: Building Products
Tech Thursdays: Building Products
Hayden Bleasel
 
Venkata
VenkataVenkata
Venkata
Venkata Kumar
 
Isomorphic JavaScript with Node, WebPack, and React
Isomorphic JavaScript with Node, WebPack, and ReactIsomorphic JavaScript with Node, WebPack, and React
Isomorphic JavaScript with Node, WebPack, and React
Tyler Peterson
 
After the LAMP, it's time to get MEAN
After the LAMP, it's time to get MEANAfter the LAMP, it's time to get MEAN
After the LAMP, it's time to get MEAN
Jeff Fox
 
Introduction To Web Development & The New Digital Workplace
Introduction To Web Development & The New Digital WorkplaceIntroduction To Web Development & The New Digital Workplace
Introduction To Web Development & The New Digital Workplace
Jen Wei Lee
 
Exploring Ruby on Rails and PostgreSQL
Exploring Ruby on Rails and PostgreSQLExploring Ruby on Rails and PostgreSQL
Exploring Ruby on Rails and PostgreSQL
Barry Jones
 
Meetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech PeopleMeetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech People
IT Arena
 
Kiss.ts - The Keep It Simple Software Stack for 2017++
Kiss.ts - The Keep It Simple Software Stack for 2017++Kiss.ts - The Keep It Simple Software Stack for 2017++
Kiss.ts - The Keep It Simple Software Stack for 2017++
Ethan Ram
 
Google App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGoogle App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and Gaelyk
Guillaume Laforge
 
DEV117 - Unleash the Power of the AppDev Pack and Node.js in Domino
DEV117 - Unleash the Power of the AppDev Pack and Node.js in DominoDEV117 - Unleash the Power of the AppDev Pack and Node.js in Domino
DEV117 - Unleash the Power of the AppDev Pack and Node.js in Domino
Heiko Voigt
 
QEWD.js: Have your Node.js Cake and Eat It Too
QEWD.js: Have your Node.js Cake and Eat It TooQEWD.js: Have your Node.js Cake and Eat It Too
QEWD.js: Have your Node.js Cake and Eat It Too
Rob Tweed
 
Node.js, for architects - OpenSlava 2013
Node.js, for architects - OpenSlava 2013Node.js, for architects - OpenSlava 2013
Node.js, for architects - OpenSlava 2013
Oscar Renalias
 
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
Heiko Voigt
 
From Java to Ruby...and Back
From Java to Ruby...and BackFrom Java to Ruby...and Back
From Java to Ruby...and Back
Anil Hemrajani
 
APIs distribuidos con alta escalabilidad
APIs distribuidos con alta escalabilidadAPIs distribuidos con alta escalabilidad
APIs distribuidos con alta escalabilidad
Software Guru
 
Recon-Fu @BsidesKyiv 2016
Recon-Fu @BsidesKyiv 2016Recon-Fu @BsidesKyiv 2016
Recon-Fu @BsidesKyiv 2016
Vlad Styran
 
Tech Thursdays: Building Products
Tech Thursdays: Building ProductsTech Thursdays: Building Products
Tech Thursdays: Building Products
Hayden Bleasel
 
Isomorphic JavaScript with Node, WebPack, and React
Isomorphic JavaScript with Node, WebPack, and ReactIsomorphic JavaScript with Node, WebPack, and React
Isomorphic JavaScript with Node, WebPack, and React
Tyler Peterson
 
Ad

More from botsplash.com (13)

Migrating to postgresql
Migrating to postgresqlMigrating to postgresql
Migrating to postgresql
botsplash.com
 
Bootstrap SaaS startup using Open Source Tools
Bootstrap SaaS startup using Open Source ToolsBootstrap SaaS startup using Open Source Tools
Bootstrap SaaS startup using Open Source Tools
botsplash.com
 
Devops Days, 2019 - Charlotte
Devops Days, 2019 - CharlotteDevops Days, 2019 - Charlotte
Devops Days, 2019 - Charlotte
botsplash.com
 
Building NLP solutions for Davidson ML Group
Building NLP solutions for Davidson ML GroupBuilding NLP solutions for Davidson ML Group
Building NLP solutions for Davidson ML Group
botsplash.com
 
Getting started with postgresql
Getting started with postgresqlGetting started with postgresql
Getting started with postgresql
botsplash.com
 
Building NLP solutions using Python
Building NLP solutions using PythonBuilding NLP solutions using Python
Building NLP solutions using Python
botsplash.com
 
Chat interfaces, Extension to Digital Marketing
Chat interfaces, Extension to Digital MarketingChat interfaces, Extension to Digital Marketing
Chat interfaces, Extension to Digital Marketing
botsplash.com
 
Cloud computing options
Cloud computing optionsCloud computing options
Cloud computing options
botsplash.com
 
Data Science meets Digital Marketing
Data Science meets Digital MarketingData Science meets Digital Marketing
Data Science meets Digital Marketing
botsplash.com
 
botsplash deep dive
botsplash deep divebotsplash deep dive
botsplash deep dive
botsplash.com
 
Building Twitter bot using Python
Building Twitter bot using PythonBuilding Twitter bot using Python
Building Twitter bot using Python
botsplash.com
 
Python for data science
Python for data sciencePython for data science
Python for data science
botsplash.com
 
Live development & tools
Live development & toolsLive development & tools
Live development & tools
botsplash.com
 
Migrating to postgresql
Migrating to postgresqlMigrating to postgresql
Migrating to postgresql
botsplash.com
 
Bootstrap SaaS startup using Open Source Tools
Bootstrap SaaS startup using Open Source ToolsBootstrap SaaS startup using Open Source Tools
Bootstrap SaaS startup using Open Source Tools
botsplash.com
 
Devops Days, 2019 - Charlotte
Devops Days, 2019 - CharlotteDevops Days, 2019 - Charlotte
Devops Days, 2019 - Charlotte
botsplash.com
 
Building NLP solutions for Davidson ML Group
Building NLP solutions for Davidson ML GroupBuilding NLP solutions for Davidson ML Group
Building NLP solutions for Davidson ML Group
botsplash.com
 
Getting started with postgresql
Getting started with postgresqlGetting started with postgresql
Getting started with postgresql
botsplash.com
 
Building NLP solutions using Python
Building NLP solutions using PythonBuilding NLP solutions using Python
Building NLP solutions using Python
botsplash.com
 
Chat interfaces, Extension to Digital Marketing
Chat interfaces, Extension to Digital MarketingChat interfaces, Extension to Digital Marketing
Chat interfaces, Extension to Digital Marketing
botsplash.com
 
Cloud computing options
Cloud computing optionsCloud computing options
Cloud computing options
botsplash.com
 
Data Science meets Digital Marketing
Data Science meets Digital MarketingData Science meets Digital Marketing
Data Science meets Digital Marketing
botsplash.com
 
Building Twitter bot using Python
Building Twitter bot using PythonBuilding Twitter bot using Python
Building Twitter bot using Python
botsplash.com
 
Python for data science
Python for data sciencePython for data science
Python for data science
botsplash.com
 
Live development & tools
Live development & toolsLive development & tools
Live development & tools
botsplash.com
 

Recently uploaded (20)

Automation Dreamin': Capture User Feedback From Anywhere
Automation Dreamin': Capture User Feedback From AnywhereAutomation Dreamin': Capture User Feedback From Anywhere
Automation Dreamin': Capture User Feedback From Anywhere
Lynda Kane
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Buckeye Dreamin 2024: Assessing and Resolving Technical Debt
Buckeye Dreamin 2024: Assessing and Resolving Technical DebtBuckeye Dreamin 2024: Assessing and Resolving Technical Debt
Buckeye Dreamin 2024: Assessing and Resolving Technical Debt
Lynda Kane
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
"PHP and MySQL CRUD Operations for Student Management System"
"PHP and MySQL CRUD Operations for Student Management System""PHP and MySQL CRUD Operations for Student Management System"
"PHP and MySQL CRUD Operations for Student Management System"
Jainul Musani
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Salesforce AI Associate 2 of 2 Certification.docx
Salesforce AI Associate 2 of 2 Certification.docxSalesforce AI Associate 2 of 2 Certification.docx
Salesforce AI Associate 2 of 2 Certification.docx
José Enrique López Rivera
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Image processinglab image processing image processing
Image processinglab image processing  image processingImage processinglab image processing  image processing
Image processinglab image processing image processing
RaghadHany
 
Automation Dreamin': Capture User Feedback From Anywhere
Automation Dreamin': Capture User Feedback From AnywhereAutomation Dreamin': Capture User Feedback From Anywhere
Automation Dreamin': Capture User Feedback From Anywhere
Lynda Kane
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Buckeye Dreamin 2024: Assessing and Resolving Technical Debt
Buckeye Dreamin 2024: Assessing and Resolving Technical DebtBuckeye Dreamin 2024: Assessing and Resolving Technical Debt
Buckeye Dreamin 2024: Assessing and Resolving Technical Debt
Lynda Kane
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
"PHP and MySQL CRUD Operations for Student Management System"
"PHP and MySQL CRUD Operations for Student Management System""PHP and MySQL CRUD Operations for Student Management System"
"PHP and MySQL CRUD Operations for Student Management System"
Jainul Musani
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Salesforce AI Associate 2 of 2 Certification.docx
Salesforce AI Associate 2 of 2 Certification.docxSalesforce AI Associate 2 of 2 Certification.docx
Salesforce AI Associate 2 of 2 Certification.docx
José Enrique López Rivera
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Image processinglab image processing image processing
Image processinglab image processing  image processingImage processinglab image processing  image processing
Image processinglab image processing image processing
RaghadHany
 

Node.js Getting Started &amd Best Practices

  • 1. Node.js Getting Started & Best Practices Charlotte Bots and AI Meetup – January 2017
  • 2. Introduction Ramu Pulipati botsplash.com Conversational bots for News media & verticals botsplash.com
  • 3. Agenda • Getting Started – Basics – Development Tools – Features – Challenges • Best Practices – Working with Node – Common Mistakes – Deployment & Monitoring
  • 4. Basics • What is it? Javascript Runtime • Created by Ryan Dhal in 2009 and managed by Node.js foundation • Early adopters: – Walmart, Netflix, Microsoft, LinkedIn, Paypal, ebay, Facebook, NY Times, Uber, Many Startups
  • 5. When to use • Why use it? – Easy to get started, learn and deploy – Can build variety of applications – Lots of open source packages and strong community – Excellent performance (if done correctly) – Javascript is everywhere. Talent pool. • When NOT to use it? – Compute =intensive tasks – Need multiple threads/processes communication – Strongly Typed Language* (Flow & TypeScript could considered)
  • 6. Applications • Web applications (front end + server side) • REST APIs • Real-time applications/Web sockets (Socket.io) • Mobile Apps (React Native) • Desktop development (Electron) • Chatbots (Slack, Facebook) • Web crawlers (Cheerio) • Internet of Things • Command line tools
  • 7. Development Tools • Getting Started – NVM for development – Use platform binary or compile source for prod • Editor Choices & Plugins – Atom Editor with Nuclide plugin – Visual Studio Code (for MS devs) • Debugging Using good tools/packages and practices will help build better code and less frustration/errors with interpreted code
  • 8. Node.js Features • Node Event Loop • Module system • Event Emitter • API for file system, sockets and processes • Clustering • ES5, ES6 and ES7 support: http://node.green/
  • 9. NPM • Node Package Manager (installed with node) • Getting started commands – npm init – npm –save or npm –save-dev – npm install – gulp/grunt – npm start
  • 10. Challenges • Interpreted code is a trap for large projects • Multiple way to things (see screen) • Everyday a new package is popular
  • 12. Working with Node.js • Project structure & npm link • Lint your code & follow style guide • Use Types – Flow vs TypeScript • Nodemon, gulp, grunt and webpack • Write tests for reusing code • Debugging using node-inspector
  • 13. Common Mistakes • Using new operator • Callbacks, Promises, Async/Await • Code refactoring • Large code base • Handle errors – try/catch, promises
  • 15. Must Have Packages Package Purpose momentjs Defacto datetime library lodash Defacto collections library request/fetch/axios Web client – REST and HTTP bluebird/async Defacto Promise library passport Web Authentication sequelize Defacto ORM dotenv Load environment variables Winston Defacto Logging eslint/babel Code linting gulp/grunt Task/build manager express/restify/sails/hel met Web applications nodemailer Email
  • 16. Deployment and Monitoring • Prod deployment using Clustering or PM2 • Deployment: Nginx or Heroku or AWS Lambda • Nginx is setup as reverse proxy • Use papertrial or loggly or newrelic for log monitoring • Upgrading version (wait for 6 months)
  • 17. Further Reading • Javascript – The good parts • NVM: https://github.com/creationix/nvm & https://github.com/coreybutler/nvm-windows • Style guide - https://github.com/airbnb/javascript • Node.js support: http://node.green • Web frameworks: http://www.tothenew.com/blog/10-powerful- node-js-frameworks-for-web-application- development/