Skip to content

LeuAlmeida/devfit.backend

Repository files navigation

Devfit

Devfit: API Rest 🔑

An API rest created with NodeJS by Léu Almeida with 💛 and ☕

GitHub language count Made by Léu Almeida License


✔️ Stack

Dependencies Security and Prevent errors
Nodemon Bcrypt
Bee-queue Dotenv
Express Handlebars Express-async-errors
Pg and pg-hstore JWT
Sequelize Sentry
Express Handlebars Youch
Yup

✅ About the API

This API is based on Express for the overall structure, uses PostgreSQL for data storage, Redis for queue data control in conjunction with Bee-queue, and Sentry for error control and internal problem maintenance.
Functions general features that use SMTP to trigger e-mails are done through nodemailer using express-handlebars and nodemailer-express-handlebars are kept in the src/app/views/emails folder.

🔌 Preparing the server

Requeriments:

  • NodeJS >= 10.16.3
  • Yarn >= 1.19.1
  • Docker >= 19.03.3
// Docker run PostgreSQL on 5434 port (change the <postgresname> and <password>)
$ sudo docker run --name <postgresname> -e POSTGRES_PASSWORD=<password> -p 5432:5432 -d postgres:11

// Docker run Redis on 5434 port (change the <redisname>)
$ sudo docker run --name <redisname> -p 6378:6379 -d -t redis:alpine

///////////////////////// DON'T FORGET TO CHANGE THE .ENV FILE ///////////////////////////

🔄 Running the application

// Clone the project
$ git clone https://github.com/LeuAlmeida/devfit.backend.git

// Entering the folder
$ cd devfit.backend

// Installing the dependencies
$ yarn

In the first terminal:

$ yarn dev

In the second terminal:

$ yarn queue

©️ Logo design by Lucas Ribeiro

Color Scheme

#806600 | #FFDB4D | #FFCC00 | #827E65E | #CCA300