Skip to content

Gambitier/nestjs-sequelize-orm

Repository files navigation

Nestjs & Sequelize

Usage

  1. Copy .env.sample to same location and rename it to .env
  2. Create database with name set in the .env file with key DB_NAME_DEVELOPMENT
  3. Run the command npm install
  4. To run the server in the watch mode, use command npm run start:dev

Nestjs Architeture

image

Sequelize and Database Setup

ref

  1. official docs
  2. How to Build Web APIs with NestJS, Postgres, and Sequelize - A Beginner's Guide
npm install --save sequelize sequelize-typescript pg-hstore pg
npm install --save-dev @types/sequelize

Setup Sequelize migration in a NestJS Project

ref: setup Sequelize migration in a NestJS Project

npm i -g @nestjs/cli

Sequelize Related Notes

  1. How to make insert with relations

    image

TODOs

  1. Create many to many relation between User and EducationInstitute
    1. create POST education-institutes/
    2. create POST users/education-institute

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published