A progressive Node.js framework for building efficient and scalable server-side applications.
This project is implemented using nestjs - a framework based on nodejs
This application includes:
- Backend: NestJs (Nodejs framework)
- Database: Postgres SQL
- ORM library for Nodejs: Sequelize
- Service layer and repository pattern, module pattern, dependence injection, automapper, rate limiter, etc...
- Unit testing: Jest (JavaScript Testing Framework - Meta)
$ npm install
please create file .env
similar to file .env.sample
and change your config
# development
$ npm run start
# watch mode
$ npm run start:dev
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
# install sequelize cli to run command
$ npm install -g sequelize-cli
# create database
$ sequelize db:create
# migration database
$ sequelize db:migrate
# install nest cli to run command
$ npm i -g @nestjs/cli
# CLI's CRUD generator
$ nest g resource [name]
# create a controller
$ $ nest g controller [controller_name]
HTTP Requests | URL | Method |
---|---|---|
Index entry point | / | GET |
Login | api/v1/users | POST |
SignUp | api/v1/users | POST |
Get all users | api/v1/users | GET |
Get user by id | api/v1/users/:id | GET |
- Open API documentation with nestjs/swagger
- Nest is an MIT-licensed open source project. read document alter using this repository at NestJsDocs.
- Sequelize is a promise-based Node.js ORM for Postgres, MySQL, MariaDB, SQLite and Microsoft SQL Server. It features solid transaction support, relations, eager and lazy loading, read replication and more at SequelizeDocs.
- Automapper: https://www.npmjs.com/package/@automapper/nestjs (current highest version v7)
# run docker compose on detach mode
$ docker-compose up --detach
This project using GitHub Action for config ci/cd
Nest is MIT licensed.