Free · 105 Topics · No Signup
Node.js Notes
JavaScript runtime — modules, HTTP, Express, databases and Raspberry Pi — written by CodingNow 2.0's mentors. Free to read, structured to actually help you learn.
Node.js notes by CodingNow 2.0 cover 105 topics — from node home to raspi components — each explained with short definitions, syntax and runnable code examples. They are 100% free, need no signup, and work as quick revision for college exams, Node.js interviews and CodingNow 2.0's mentor-led Node.js course in Pitampura, Delhi.
Node.js Tutorial
Node.js Tutorial chapters
Asynchronous
Asynchronous chapters
Module Basics
Module Basics chapters
Core Modules
Core Modules chapters
JS & TS Features
JS & TS Features chapters
Building Applications
Building Applications chapters
Database Integration
Database Integration chapters
Advanced Communication
Advanced Communication chapters
Testing & Debugging
Testing & Debugging chapters
Node.js Deployment
Node.js Deployment chapters
Perfomance & Scaling
Perfomance & Scaling chapters
Node.js Advanced
Node.js Advanced chapters
Hardware & IoT
Hardware & IoT chapters
No notes found. Try a different search term, or browse all Node.js notes.
Node.js Tutorial
9 of 9 topics publishedNode HOME
Node.js is a free, open source tool that lets you run JavaScript outside the web browser.
Node Intro
- Core concepts like modules and the event loop
Node Get Started
2. Download the LTS (Long Term Support) version
Node JS Requirements
If you're new to JavaScript, don't worry!
Node.js vs Browser
Node.js and browsers both run JavaScript, but they have different environments and capabilities.
Node Cmd Line
Node.js provides a powerful command line interface (CLI) that allows you to run JavaScript files, manage packages, debug applications, and more.
Node V8 Engine
The V8 engine is Google's open-source JavaScript engine, used by Chrome and Node.js.
Node Architecture
Node.js uses a single-threaded, event-driven architecture that is designed to handle many connections at once, efficiently and without blocking the main thread.
Node Event Loop
The event loop is what makes Node.js non-blocking and efficient.
Asynchronous
4 of 4 topics publishedNode Async
In Node.js, asynchronous operations let your program do other work while waiting for tasks like file I/O or network requests to complete.
Node Promises
Promises in Node.js provide a cleaner way to handle asynchronous operations compared to traditional callbacks.
Node Async/Await
Async/await is a modern way to handle asynchronous operations in Node.js, building on top of Promises to create even more readable code.
Node Errors Handling
Errors are inevitable in any program, but how you handle them makes all the difference. In Node.js, proper error handling is crucial because:
Module Basics
7 of 7 topics publishedNode Modules
Modules are the building blocks of Node.js applications, allowing you to organize code into logical, reusable components. They help in:
Node ES Modules
ES Modules (ESM) is the official standard format for packaging JavaScript code for reuse.
Node NPM
NPM is a package manager for Node.js packages, or modules if you like.
Node package.json
package.json is a special file that describes your Node.js project.
Node NPM Scripts
NPM scripts are commands you define in your package.json file to automate tasks like:
Node Manage Dep
Dependency management is the process of tracking, installing, updating, and removing the external packages your application depends on.
Node Publish Packages
Publishing a package means making your Node.js module or project available for others to install and use via the npm registry.
Core Modules
15 of 15 topics publishedHTTP Module
Node.js includes a powerful built-in HTTP module that enables you to create HTTP servers and make HTTP requests.
HTTPS Module
The HTTPS module is a core Node.js module that provides an implementation of the HTTPS protocol, which is essentially HTTP over TLS/SSL.
File System (fs)
The Node.js File System module (fs) provides a comprehensive set of methods for working with the file system on your computer.
Path Module
The Path module is a built-in Node.js module that provides tools for handling and transforming file paths across different operating systems.
OS Module
The OS module in Node.js provides a powerful set of utilities for interacting with the underlying operating system.
URL Module
The URL module provides utilities for URL resolution and parsing.
Events Module
Every action on a computer is an event, like when a connection is made or a file is opened.
Stream Module
In Node.js, streams are collections of data, which might not be available in full at once and don't have to fit in memory.
Buffer Module
The Buffer module in Node.js is used to handle binary data.
Crypto Module
The Crypto module is a built-in Node.js module that provides cryptographic functionality including:
Timers Module
The Timers module provides functions that help schedule code execution at specific times or intervals.
DNS Module
The DNS (Domain Name System) module provides functionality for name resolution in Node.js.
Assert Module
The Assert module provides a simple yet powerful set of assertion tests for validating invariants in your code.
Util Module
The Util module is a core Node.js module that provides a collection of utility functions for common tasks.
Readline Module
The Readline module is a core Node.js module that provides an interface for reading data from a Readable stream (like process.stdin ) one line at a time.
JS & TS Features
5 of 5 topics publishedNode ES6+
ES6 (ECMAScript 2015) and later versions add powerful new features to JavaScript that make your code more expressive, concise, and safer.
Node Process
Process management in Node.js is about controlling your application's lifecycle.
Node TypeScript
TypeScript is a superset of JavaScript that adds optional static typing.
Node Adv. TypeScript
This guide dives into advanced TypeScript features and patterns specifically useful for Node.js applications.
Node Lint & Formatting
Consistent code quality and style is important for Node.js projects, especially in team environments.
Building Applications
6 of 6 topics publishedNode Frameworks
Node.js frameworks provide structure, organization, and common utilities for building web applications, APIs, and more.
Express.js
Express.js (or simply Express) is the most popular Node.js web application framework, designed for building web applications and APIs.
Middleware Concept
Middleware is a key part of Node.js web applications, particularly in Express.js.
REST API Design
REST (Representational State Transfer) is an architectural style for designing networked applications that has become the standard for web services.
API Authentication
API authentication is the process of verifying the identity of clients accessing your Node.js APIs.
Node.js with Frontend
Introduction to Frontend Integration with Node.js
Database Integration
24 of 24 topics publishedMySQL Get Started
Node.js can be used in database applications.
MySQL Create Database
To create a database in MySQL, use the "CREATE DATABASE" statement:
MySQL Create Table
To create a table in MySQL, use the "CREATE TABLE" statement.
MySQL Insert Into
To fill a table in MySQL, use the "INSERT INTO" statement.
MySQL Select From
To select data from a table in MySQL, use the "SELECT" statement.
MySQL Where
When selecting records from a table, you can filter the selection by using the "WHERE" statement:
MySQL Order By
Use the ORDER BY statement to sort the result in ascending or descending order.
MySQL Delete
You can delete records from an existing table by using the "DELETE FROM" statement:
MySQL Drop Table
You can delete an existing table by using the "DROP TABLE" statement:
MySQL Update
You can update existing records in a table by using the "UPDATE" statement:
MySQL Limit
You can limit the number of records returned from the query, by using the "LIMIT" statement:
MySQL Join
You can combine rows from two or more tables, based on a related column between them, by using a JOIN statement.
MongoDB Get Started
Node.js can be used in database applications.
MongoDB Create DB
To create a database in MongoDB, start by creating a MongoClient object, then specify a connection URL with the correct ip address and the name of the database
MongoDB Collection
Note: A collection in MongoDB is the same as a table in MySQL
MongoDB Insert
To insert a record, or document as it is called in MongoDB, into a collection, we use the insertOne() method.
MongoDB Find
Note: In MongoDB we use the find and findOne methods to find data in a collection. Just like the SELECT statement is used to find data in a table in a MyS
MongoDB Query
When finding documents in a collection, you can filter the result by using a query object.
MongoDB Sort
Use the sort() method to sort the result in ascending or descending order.
MongoDB Delete
To delete a record, or document as it is called in MongoDB, we use the deleteOne() method.
MongoDB Drop Collection
You can delete a table, or collection as it is called in MongoDB, by using the drop() method.
MongoDB Update
You can update a record, or document as it is called in MongoDB, by using the updateOne() method.
MongoDB Limit
To limit the result in MongoDB, we use the limit() method.
MongoDB Join
MongoDB is not a relational database, but you can perform a left outer join by using the $lookup stage.
Advanced Communication
3 of 3 topics publishedGraphQL
GraphQL is a query language for APIs and a runtime for executing those queries against your data. It was developed by Facebook in 2012 and publicly released in
Socket.IO
Socket.IO is a powerful JavaScript library that enables real-time, bidirectional, and event-based communication between web clients and servers. It's designed t
WebSockets
WebSockets provide a persistent connection between client and server, allowing for real-time, bidirectional communication.
Testing & Debugging
4 of 4 topics publishedNode Adv. Debugging
Effective debugging is a critical skill for Node.js developers.
Node Testing Apps
Testing is an essential part of software development that provides numerous benefits:
Node Test Frameworks
Introduction to Node.js Testing Frameworks
Node Test Runner
The built-in node:test module provides a lightweight, no-dependency framework for writing and running JavaScript tests directly in Node.js.
Node.js Deployment
5 of 5 topics publishedNode Env Variables
Environment variables are dynamic named values that can affect how running processes behave on a computer.
Node Dev vs Prod
Differences between Development and Production
Node CI/CD
Continuous Integration (CI) and Continuous Deployment (CD) are essential practices that automates the software development lifecycle, enabling teams to deliver
Node Security
Security is critically important for Node.js applications for several reasons:
Node Deployment
Deployment strategies focus on how to deploy and manage your Node.js applications in production.
Perfomance & Scaling
6 of 6 topics publishedNode Logging
Effective logging is essential for several reasons:
Node Monitoring
Observability in Node.js applications involves collecting and analyzing metrics and logs to understand system behavior.
Node Performance
Node.js offers various tools and techniques for diagnosing performance issues.
Child Process Module
The Child Process module is a built-in Node.js module that allows you to create and manage child processes.
Cluster Module
The Cluster module provides a way to create multiple worker processes that share the same server port.
Worker Threads
Worker Threads are a feature introduced in Node.js (initially in v10.5.0 as an experimental feature and stabilized in v12) that allows JavaScript code to run in
Node.js Advanced
9 of 9 topics publishedMicroservices
Microservices is an architectural style that structures an application as a collection of small, loosely coupled services. Each service is:
Node WebAssembly
WebAssembly (Wasm) is a binary instruction format designed as a portable compilation target for high-level languages like C, C++, and Rust.
HTTP2 Module
The Node.js HTTP/2 module provides an implementation of the HTTP/2 protocol, offering improved performance, server push capabilities, header compression, and mu
Perf_hooks Module
The perf_hooks module provides a set of APIs for performance measurement based on the W3C Performance Timeline specification.
VM Module
The VM (Virtual Machine) module allows you to compile and run code within isolated contexts.
TLS/SSL Module
Transport Layer Security (TLS) and its predecessor, Secure Socket Layer (SSL), are protocols that provide secure communication over a computer network. They ens
Net Module
The Net module is one of Node.js's core networking modules, allowing you to create TCP servers and clients. TCP (Transmission Control Protocol) is a reliable, o
Zlib Module
The Zlib module provides bindings to the zlib and brotli compression libraries, enabling you to:
Real-World Examples
One of the most common Node.js applications is building RESTful APIs. Here's an example of a simple but practical Todo API with Express:
Hardware & IoT
8 of 8 topics publishedRasPi Get Started
Raspberry Pi is a small, multi-use computer.
RasPi GPIO Introduction
GPIO stands for General Purpose Input Output.
RasPi Blinking LED
In this chapter we will use a Raspberry Pi and its GPIO to make a LED blink.
RasPi LED & Pushbutton
In the previous chapter we learned how to use a Raspberry Pi and its GPIO to make a LED blink.
RasPi Flowing LEDs
Using Array With Output to Create Flowing LEDs
RasPi WebSocket
WebSocket enables bidirectional communication in real time over the web.
RasPi RGB LED WebSocket
In the previous chapters we have learned how to use WebSocket, and how to use GPIO to turn LEDs on and off.
RasPi Components
Components are parts of a larger whole. In this chapter, we explain the different components we use in our tutorial.
Ready to go from notes to a real career?
Join CodingNow 2.0's Node.js course — live mentorship, hands-on projects, and 100% placement support in Delhi NCR.
Enroll Now — Free Demo AvailableNode.js Notes – FAQs
What students search before reading Node.js notes.