Code Monkey home page Code Monkey logo

players-backend-nestjs's Introduction

Api Players

Api that exposes a list of player elements extracted from a moongoose database.

**Deploy in heroku:** https://playersapinest.herokuapp.com/api/v1/

Description

It was built with the nest framework Nest.

Instructions to execute:

  • 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 or yarn install.
  • Execute the project: npm start.

Project architecture

  • 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

Diagrams C4 Model

architecture c4

Installation

$ npm install

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Test

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

Api Documentation

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/

Postman

You can test in postman:

Run in Postman

Docker

You can download the associated docker image in the Packages section in the right menu of github.

players-backend-nestjs's People

Contributors

franciscoquijada avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.