Step by step tutorial on building REST API using Node.js, Express.js, Sequelize.js and PostgreSQL.
A comprehensive step by step tutorial on building RESTful API using Node.js, Express.js, Sequelize.js, and PostgreSQL. In this tutorial, we will show how to create a little complex table association or relationship with CRUD (Create, Read, Update, Delete) operations. So, the association or relationship will be like this diagram.
This tutorial divided into several steps:
Step #1: Create Express.js Project and Install Required Modules
Step #2: Add and Configure Sequelize.js Module and Dependencies
Step #3: Create or Generate Sequelize Models and Migrations
Step #4: Create Express Controller and Router for Classroom Model
Step #5: Create Express Controller and Router for Student Model
Step #6: Create Express Controller and Router for Lecturer Model
Step #7: Create Express Controller and Router for Course Model
Step #8: Advance Express Route and Function for Association
Step #9: Run and Test The Node, Express, Sequelize, and PostgreSQL REST API
Full article here:
https://www.djamware.com/post/5b56a6cc80aca707dd4f65a9/nodejs-expressjs-sequelizejs-and-postgresql-restful-api
Source code:
https://github.com/didinj/node-express-postgresql-sequelize.git
#api #node #express #postgresql #sequelize