Slide 1

Slide 1 text

IE NITK Summer Mentorship Program - MEAN Stack

Slide 2

Slide 2 text

Mishal Shah Shreyas Seshadri Speakers….

Slide 3

Slide 3 text

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

Slide 4

Slide 4 text

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.

Slide 5

Slide 5 text

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.

Slide 6

Slide 6 text

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

Slide 7

Slide 7 text

Node.js Working ● Non-blocking Asynchronous I/O! ● Single Threaded ● Event Driven ● Do not use for CPU intensive applications!

Slide 8

Slide 8 text

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()

Slide 9

Slide 9 text

Node Core Modules (Important Ones) ● File System ● HTTP Server ● Event Emitter

Slide 10

Slide 10 text

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….