This project is a back-end API developed for GoBarber web site and APP.
- 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
- EditorConfig (https://editorconfig.org/)
- ESLint (https://eslint.org/)
- Prettier (https://prettier.io/)
To run the project locally, you will need the follow dependencies:
- NodeJS (https://nodejs.org/en/download/)
- NPM (Automatically installed with NodeJS) or YARN (https://classic.yarnpkg.com/pt-BR/docs/install/)
- docker (https://docs.docker.com/get-docker/)
- docker-compose (https://docs.docker.com/compose/install/)
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.
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.
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