A boilerplate for building RESTful APIs using Nest.js, PostgreSQL, TypeORM.
- Install Node.JS LTS version
- Install PostgreSQL
- Clone this repository and enter on the respective folder
- Install dependencies running:
yarn
ornpm install
- Create database (by follow the commands):
- CREATE USER
user
WITH PASSWORDpassword
- CREATE DATABASE
database
- GRANT ALL PRIVILEGES ON DATABASE
database
touser
`
- Change name value of .env.example to .env and set the key SECRET to any value you wish
- Change the database info at .env for yours config
- Run
npm run start
ornpm run start:dev
to start server
- Run tests:
npm run test
├── /src
| ├── /app
| | |── /role
| | | |── /entity
| | |── /user
| | | |── /entity
| | | |── /dto
| | | |── /interface
| ├── /constant
| ├── /helpers
| ├── /strategy
├── /test