Skip to content

A RestAPI boilerplate using Nest.js, Typeorm with openApi enabled and optimized

Notifications You must be signed in to change notification settings

fafamnzm/nest-test

Repository files navigation

Nest Logo

Stay in touch

Soo, here's a nest.js boiler plate for a simple generic RestAPI of user post using Postgres for DB and typeorm for its orm

Just a quick note, I changed the watch mode to start command instead of start:dev just because I could hhaha! I prefer it this way as it is easier and faster to type

And We use postgres for db, So you have to have that installed and then create a databse name nest-test, otherwise you're gonna see some errors of db not found!

Thank you

Installation

$ npm install
in order to setup the db, please refer to `.env.example` file and after creating a `.env` file, add the data accordingly

`DB_USERNAME` is the username of your daatabase

`DB_PASSWORD` is the password for your database

`TOKEN_SECRET` is the secret key for jwt to encypt the tokens with

`HASH_SALT` is an integer for  salting the bcrypt (recommended 10)


To access swagger UI visit:

      `http://localhost:3000/api/` for all endpoints

Running the app

# watch mode
$ npm run start

# development
$ npm run start:dev

# production mode
$ npm run start:prod

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.

License

Nest is MIT licensed.

About

A RestAPI boilerplate using Nest.js, Typeorm with openApi enabled and optimized

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published