Stage 3 of 5
Stage 3: Backend Essentials
Server-side JavaScript with Node.js and Express, plus databases from SQL to Prisma and MongoDB.
What this stage covers
12 hands-on lessons built around runnable examples. Every lesson is published as a full page below — read it, copy the code, do the assignment, then check the solution.
- Node.js
- Express
- REST APIs
- SQL
- Prisma
- MongoDB
Node.js
6 lessonsRun JavaScript on the server: modules, npm, Express and REST APIs.
About this subject
Course Overview
This course takes you from your first node app.js to a REST API with persistent storage. It covers the runtime, the standard library, npm, Express and the patterns every backend is built from — 6 lessons, each with a runnable example and an assignment.
Prerequisites
- JavaScript fundamentals: variables, functions, arrays, objects,
async/await - Comfort with the terminal
- Node.js 20 or newer and npm installed
- VS Code (recommended)
Lesson List
| Lesson | Title | Key Topics |
|---|---|---|
| Lesson 01 | Node.js Basics | runtime, REPL, CommonJS vs ESM, process.argv, exit codes |
| Lesson 02 | Built-in Modules | fs, path, os, EventEmitter, sync vs async |
| Lesson 03 | npm Packages | package.json, dependencies, npx, nodemon, dayjs, .gitignore |
| Lesson 04 | Express Basics | routing, middleware, static files, 404 handling |
| Lesson 05 | REST API | resources, HTTP methods, status codes, validation, CRUD |
| Lesson 06 | File-based Database | JSON persistence, read/write helpers, .env, pagination |
Study Method
- Read the lesson, then run the example with
node. - Change one thing and observe what breaks — that is where the learning is.
- Attempt the assignment before opening the reference solution.
- Test every endpoint with
curlor an HTTP client. - Keep a
notes.mdof errors you hit and how you fixed them.
Setup
node --version
npm --version
mkdir node-course && cd node-course
npm init -y
References
Node.js Basics
What Node.js is, the REPL, the module system and running your first script.
Built-in Modules
fs, path, os and events from the Node.js standard library.
npm and Packages
package.json, installing dependencies, scripts and faster development with nodemon.
Express Basics
Servers, routing, middleware and serving static files with Express.
REST API
Designing GET, POST, PUT and DELETE endpoints that return JSON.
File-based Database
Persisting data to JSON files and keeping secrets in .env files.
Database
6 lessonsStore data properly: relational concepts, SQL, SQLite, Prisma and MongoDB.
About this subject
Course Overview
Data outlives code. This course teaches how to store it properly: the relational model, SQL from first principles to joins and indexes, SQLite in Node, Prisma for typed database access, and MongoDB for document-shaped data — 6 lessons.
Prerequisites
- Basic JavaScript and Node.js
- A terminal and a code editor
- SQLite CLI (optional but useful):
sqlite3 --version
Lesson List
| Lesson | Title | Key Topics |
|---|---|---|
| Lesson 01 | Database Concepts | tables, keys, relationships, RDBMS vs NoSQL, SQLite |
| Lesson 02 | SQL Basics | CREATE TABLE, INSERT, SELECT, WHERE, UPDATE, DELETE |
| Lesson 03 | Advanced SQL | JOIN, GROUP BY, HAVING, subqueries, indexes, transactions |
| Lesson 04 | Node.js + SQLite | better-sqlite3, prepared statements, CRUD API |
| Lesson 05 | Prisma ORM | schema.prisma, migrations, relations, Prisma Client |
| Lesson 06 | MongoDB Basics | documents, collections, Mongoose, Atlas, indexes |
Study Method
- Write every query by hand before wrapping it in JavaScript.
- Keep
schema.sqlin the project and rebuild the database from it. - Break things on purpose: insert a duplicate, violate a foreign key, then read the error.
- Run
EXPLAIN QUERY PLANon at least one query per lesson. - For the ORM lessons, inspect the generated SQL (
prisma studio, query logging).
Setup
npm install better-sqlite3
sqlite3 shop.db < schema.sql
npm install -D prisma
npm install @prisma/client
npx prisma init --datasource-provider sqlite
References
Database Concepts
Relational versus NoSQL thinking, tables, keys and where SQLite fits.
SQL Basics
CREATE TABLE, INSERT, SELECT, UPDATE and DELETE statements.
Advanced SQL
JOINs, GROUP BY, subqueries and indexes for real queries.
Node.js + SQLite
A working CRUD API backed by better-sqlite3 and Express.
Prisma ORM
Schema modeling, migrations, relations and the Prisma Client.
MongoDB Basics
Documents, collections, Mongoose models and MongoDB Atlas.
The 5-stage series
64 lessons totalLearn this stage with a mentor
Work through these lessons on your own, or join a guided cohort at our Pitampura campus and online.