
Explore building rest apis with Node.js, Express, and MySQL, covering basic authentication, oauth2, and jwt through hands-on projects from Hello World Node.js api to database crud.
Prepare your Node.js bootcamp workspace by installing Node.js, MySQL with Workbench, editors like Visual Studio Code or JetBrains WebStorm, and Postman with internet access for npm libraries.
Set up the node.js environment by installing node.js from nodejs.org, selecting LTS or current, and verifying with node --version. Use Visual Studio Code or WebStorm on Windows, macOS, or Linux.
Declare variables in node.js with var, initialize values, and print results with console.log in visual studio code; run hello.js and vardemo.js with node in the terminal.
Explore relational and logical operators in Node.js, test expressions with variables, and combine conditions using and or. Prepare to build control statements and looping statements.
Use if statements in a Node.js app with comparisons like a>3 and a<7, and combine conditions with and/or operators. Apply switch statements to handle multiple cases, including default not selected.
Build a node.js application that demonstrates looping with for and while, including initialization, conditions, and increments, and outputs with console.log. Create nested loops and ensure proper termination to avoid infinite loops.
Declare arrays in Node.js with numbers = [4,5,6,7] and str = ['aa','bb','cc']; loop through arrays with for and print elements using console.log, using .length to get the size.
Learn to build a Node.js REST API using Express, install Express with npm, and install the Express generator to scaffold a REST API application.
Build your first REST API with Node.js and Express by creating a new project, applying a no-view setup, and implementing a JSON GET route that returns hello REST API.
Test a restful api application built with Express by running the project, using http get on localhost:3000, with npm start and debug mode, and testing with Postman.
Build a calculator api with Node.js and Express, exposing add, subtract, multiply, and divide endpoints, and test requests and responses in json with Postman.
Create a calculator api project with express, initialize it from the express template, and install dependencies. Open the project to prepare for building the calculator api in the next lesson.
Build a calculator API with node.js and express by defining post routes for add, subtract, multiply, and divide, reading valA and valB from the request body, and registering the router.
Test a calculator REST API built with express by sending GET and POST requests to /calculator with JSON bodies, using Postman to perform add, subtract, multiply, and divide.
We implement a Node.js and Express-based REST API with MySQL, building CRUD endpoints like /, /create, /:id, /update, and /delete/:id, using json requests and responses and test them with Postman.
Prepare the database with mysql workbench, connect to the server, and create a product table with idproduct as auto-incrementing primary key and fields name, quantity, price, created.
Create and configure a new productapi project using Express, install MySQL, and set up npm dependencies to enable CRUD operations for a Node.js rest api.
Create a product CRUD API with Express and MySQL, defining routes for create, update, delete, get all, and detail, using parameterized queries to prevent SQL injection.
Run the project with DEBUG=productapi:* npm start, verify the MySQL connection, and test CRUD operations via Postman: get all, create with name, quantity, price; update by id; delete by id.
Learn how to implement basic authentication in a Node.js rest api using Express and MySQL, with passport.js, Postman testing, and user registration flow.
Prepare the database by using nodedb and create a new user table with id as auto increment primary key, plus username, password (salted), fullname, and email (all not null).
Create and set up a Node.js Express project for a rest api, install MySQL, name the project basicauthdemo, and prepare to implement basic authentication.
Build a MySQL-backed user management layer for a Node.js REST API with db.js and utils.js, enabling login, register, and get profile, using salt-based password hashing and a crypto utility.
Expose a register endpoint at /register in a Node.js REST API, hashing the password with salt and storing username, full name, and email via db.register, returning created on success.
Implement basic authentication in a Node.js RESTful API using passport.js and the passport-http BasicStrategy, with setup, DB login checks, and protected /profile route.
Test and run a Node.js REST API built with Express and MySQL, register users via /users/register with a JSON body, then access /profile/5 using basic authentication in Postman.
Explore OAuth2, its grant types, and token flows, and learn to implement a Node.js OAuth2 server with oauth2orize and passport.js tested via Postman on a MySQL RESTful setup.
Prepare the database by using the existing nodedb and user table from the basic authentication project, then set up a new OAuth2 project without altering data.
Create a new express project, navigate to the folder, and install required libraries, including encryption and express-session. Set up an oauth2 server and client, then prepare database and oauth2 configuration.
Write and expose a node module to manage OAuth2 data, implementing user, client (array), access token (array), and authorization codes (array) storage with find and save functions.
Implement OAuth2 on a node.js rest API by configuring passport for bearer and basic auth, validating tokens against MySQL users and clients, and exposing token endpoints and authorization flow.
Test a Node.js rest api with express and oauth2 by obtaining an access token via /oauth/token using basic auth, then access /profile with a bearer token.
Learn to implement a Node.js REST API with Express and MySQL using JWT authentication, signing with jsonwebtoken and verifying with passport-jwt, tested via Postman, and using a private RSA key.
Prepare the database by using an existing database and the user table with id, username, password, salt, fullname, and email, then move on to building an Express project.
Create a new express project named jwtdemo, install essential libraries for jwt-based authentication (bcryptjs, mysql, passport, passport-jwt, jsonwebtoken), and prepare for implementing the project.
Configure the database and copy users.js from a previous project, exposing findById, findByUsername, and getprofile so you can use this database in your jwt token validation.
Apply jwt token in a Node.js rest api using passport-jwt, configure strategy and extractJwt, sign payloads with a secret, set expiration, and expose login and private routes guarded by token.
Test the REST API by running the project, using postman to call /hello without a token, then login to obtain a JWT and access /profile with a Bearer token.
Generate and deploy an RSA private key with OpenSSL to sign JWT tokens, inject the key into your secret, and validate user login with RSA-signed tokens.
This bootcamp is designed for everyone who wants to learn and upgrade REST API development using Node.js. Various Node.js REST API projects are provided to increase your skills and experiences. All projects are delivered with step-by-step approaches.
You will develop the following REST API projects:
Hello world REST API
Calculator API
MySQL CRUD (Create, Read, Update, Delete) API
Applying basic authentication for Node.js REST API
Applying OAuth2 for Node.js REST API
Applying JWT token for Node.js REST API
For students without Node.js programming skill, this bootcamp delivers a brief Node.js programming so you can follow this bootcamp easily.
In this bootcamp, you will learn how to build REST API using Node.js and Express from the scratch . Starting to create a project, writing codes, and testing REST APIs.