- Allows us to build scalable network applications using JavaScript on the server-side
V8 JavaScript Runtime
, that is the same runtime that is used in ourChrome
browser- Node does provides a wrapper around this engine providing additional functionality for building network applications
- It's fast because it's mostly
C++
code - Use
V8
engine to understand JavaScript - Use
LIBUV
library which works a lot to create a Event Loop to extend Async properties
Websocket server
, like a chat server- Fast File Upload Client
- Ad Server
- Any Real-Time Data Apps
- A Web Framework, not going to replace
Rails
, notDjango
, - For Beginners (It's very low level)
- Multi-threaded (think of it as a single threaded server)
JavaScript has certain chaacteristics that make it very different that other dynamic languages, namely that it has no concept
of threads. Its model of concurrency is completely based around events.
--- Ryan Dahl
Node.js is a non-blocking codes.
- Calls out to web services
- Reads/Writes on the Databases
- Calls to extensions
var http = require('http'); // how we require modules
http.createServer(function(request, response) {
response.writeHead(200); // status code in header
response.write('Dog is running'); // Response body
response.end(); // Close th connection
}).listen(8080); // Listen for connections on this port
console.log(Listening on port 8080);
browser-sync start --server --directory --files "*"
$ nvm install v<newversion> --reinstall-packages-from=<oldversion>
# e.g. nvm install v7.1.0 --reinstall-packages-from=4.3.2
$ nvm use 4.3.2 # Use a specific version
# npm i <package_name_alias>@npm:<package_name>, let's say 'formik' is the package name
$ npm i formik-latest@npm:[email protected]
- JavaScript (ES6) Class
- JavaScript Prototype
- Immediately Invoked Function Expression (IIFE)
- JavaScript Closures
- The Module Pattern
- Hoisting
- Understanding Scope
- Currying
- Memorization
- Callback Function
- The apply(), call(), bind() methods
- Polymorphism in JavaScript
- Asynchronous JS
- Understand Promises
- Async & Await