Api that exposes a list of player elements extracted from a moongoose database.
**Deploy in heroku:** https://playersapinest.herokuapp.com/api/v1/It was built with the nest framework Nest.
- Clone this repository.
- Go to the root directory of the project.
- Create file .env, you can follow the example of the .envExample file in the root of proyect.
- Install the dependencies with this command:
npm install
oryarn install
. - Execute the project:
npm start
.
- configs: Contains constants for the definition of the api version and the prefix used in the urls
- database: Contains constants the connection string used to connect with mongoose.
- commons: Contains classes that are shared by system modules.
- pagination: Dto related to pagination.
- modules: Contains the modules that make up the system
- players: Module associated with the players entity
- controllers: Controllers associated with the players entity
- schemas: Contains the schema player
- services: Contains the services associated with the players entity
- players: Module associated with the players entity
$ npm install
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
This project has unit tests, which you can run with the command:
# unit tests
$ npm run test
This project has Tests E2E, which you can run with the command:
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
When running the project you can verify the api documentation through Swagger using the url: YourUrl/api/. You can test it in this deployment: https://playersapinest.herokuapp.com/api/
You can test in postman:
You can download the associated docker image in the Packages section in the right menu of github.