A progressive Node.js framework for building efficient and scalable server-side applications.
Greenrun-test is an API-RESTful developed in Nest v9.0.0, using a Node v16.13.1, with a microservices software model and following the SOLID and DRY principles, using Jest for unit testing and JWT for access auth.
Greenrun-test is deployed in Heroku both the backend and the database, that is a PostgreSQL database, which is connected with the backend through Prisma as ORM tool.
This App wass deployed automatically by CI/CD workflows (CI: GitHub Actions pipeline, CD: Heroku auto deployment), using the MASTER branch for it deploy, using too GitHub repo secrets.
# local
http://localhost:3000/api/
# deploy
http://localhost:3000/apidoc/
# install dependencies
$ npm install
# build the project
$ npm run build
# set environment variables
PORT
POSTGRESQL_DATABASE_URL
BCRYPT_SALT_ROUNDS
AUTH_CODE_CREATE_ADMIN = 945790 !also use it to test the register admin endpoint
JWT_SECRET_KEY
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
# unit tests
$ npm run test
This application is documented using Swagger, you can also look de docs in both environments:
# local
http://localhost:3000/apidoc/
# deploy
https://greenrun-sports-backend.herokuapp.com/apidoc/
And also there is a Insomnia collection to test the API manually (there are both environments in itself: local and deploy, setup the vars before to test), that it's in
# collection file
root/Insomnia API/Insomnia_2022-08-09.json
Brayan Rivera Cepeda - Ssr. fullstack web developer
- Author - Kamil Myśliwiec
- Website - https://nestjs.com
- Twitter - @nestframework
Nest is MIT licensed.