/gobarber-api

GoBarber API using NodeJS

Primary LanguageTypeScript

GOBARBER-API

CI/CD Coverage Status Quality Gate Status Maintainability Rating Reliability Rating Security Rating

This project is a back-end API developed for GoBarber web site and APP.

Technologies

  • TypeScript
  • Node.js
  • Express
  • JSON Web Token (JWT)
  • Multer (File Upload)
  • Tsyringe (Dependency Injection)
  • TypeORM
  • PostgreSQL
  • MongoDB
  • Redis
  • Jest
  • Node Mailer
  • Ethereal (Mail Trap)
  • AWS Simple Mail Service (SES)
  • AWS Simple Storage Service (S3)
  • Docker
  • Docker-Compose

Formatters

Project Startup

To run the project locally, you will need the follow dependencies:

First off all, create a .env file using .env.example file. After that running all the commands bellow:

$ docker-compose up

If you are using NPM run:

$ npm install

$ npm typeorm migration:run

$ npm dev:server

If you are using YARN run:

$ yarn install

$ yarn typeorm migration:run

$ yarn dev:server

The docker-compose will start the MongoDB, PostgreSQL and Redis.

Other information

Tests and code coverage

This project use Jest as test framework. To execute the tests, run yarn test or npm test. The code report will be generated in coverage/lcov-report/index.html folder.

Create new migrations

To create new migrations, run the command bellow:

If you are using NPM run:

$ npm migration:create -n MigrationName

If you are using YARN run:

$ yarn migration:create -n MigrationName