Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Introduction to Node.js

Introduction to Node.js

An Introduction to Node.js session by Shreyas Seshadri & Mishal Shah

YouTube Video: https://www.youtube.com/watch?v=n0mCoeKRkrg

Shreyas Seshadri: https://github.com/shreyasseshadri/
Mishal Shah: https://mishal23.github.io/


Mishal Shah

May 29, 2020


  1. IE NITK Summer Mentorship Program - MEAN Stack

  2. Mishal Shah Shreyas Seshadri Speakers….

  3. Backend: Store data, send data, send email, push notifications etc….

  4. HTTP Requests HTTP defines a set of request methods to

    indicate the desired action to be performed for a given resource. GET: The GET method requests a representation of the specified resource. Requests using GET should only retrieve data. POST: The POST method is used to submit an entity to the specified resource, often causing a change in state or side effects on the server. PUT: The PUT method replaces all current representations of the target resource with the request payload.
  5. HTTP Requests DELETE: The DELETE method deletes the specified resource.

    OPTIONS: The OPTIONS method is used to describe the communication options for the target resource.
  6. Background • Cross platform runtime environment to execute JavaScript code

    outside of browser • Build backend services -- API • Highly scalable, data-intensive real time applications, streaming, gaming • Used by: PayPal, Uber, Netflix, Walmart • JavaScript everywhere! • Lot of open-source libraries - NPM (node package manager) • V8 is JavaScript Engine developed by Google • Node.js runs on V8 • Not for DOM Manipulation • Node is not a language, not a framework
  7. Node.js Working • Non-blocking Asynchronous I/O! • Single Threaded •

    Event Driven • Do not use for CPU intensive applications!
  8. What is non-blocking I/O? • Traditional ◦ var result =

    db.query(“select x from table_y”); ◦ doABC(result); ◦ doBCD(); • Non-blocking I/O ◦ db.query(“select x from table_y”, function (result) { doABC(result); } ◦ doBCD()
  9. Node Core Modules (Important Ones) • File System • HTTP

    Server • Event Emitter
  10. Interesting Modules • Express: to make things simpler e.g syntax,

    routing, DB connections • Jade: HTML template system • Socket.io: create real time applications • Nodemon: automatically monitor node.js & push changes Many more….