Published On: February 12th, 2023Categories: AI News

Let’s create a CRUD rest API in JavaScript, using:

  • Node.js
  • Express
  • Sequelize
  • Postgres
  • Docker
  • Docker Compose

If you prefer a video version:
youtube logo link


Here is a schema of the architecture of the application we are going to create:

crud, read, update, delete, to a node.js app and postgres service, connected with docker compose. POstman and tableplus to test it

We will create 5 endpoints for basic CRUD operations:

  • Create
  • Read all
  • Read one
  • Update
  • Delete

We will create a Node.js application using:

  • Express as a framework
  • Sequelize as an ORM
  1. We will Dockerize the Node.js application

  2. We will have a Postgres istance, we will test it with Tableplus

  3. We will create a docker compose file to run both the services

  4. We will test the APIs with Postman


Here is a step-by step guide.

create a new folder

mkdir node-crud-api
Enter fullscreen mode

Exit fullscreen mode

step into it

cd node-crud-api
Enter fullscreen mode

Exit fullscreen mode

initialize a new npm project

npm init -y
Enter fullscreen mode

Exit fullscreen…

Source link

Leave A Comment