Skip to content

matheusvellone/nodejs-concept-api

Repository files navigation

NodeJS Concept Api

Features

  • Global Error Handling
  • JWT Tokens
  • Social Logins
    • Facebook
  • Password hashing with bcrypt
  • Input validation with joi
  • Production Console
  • Specific code for each response

Requirements

  • docker
  • docker-compose
  • git-crypt
  • make (optional, but recommended)

Configuration

You can configure all environment variables for your environment via the config/environment directory. Each environment has its own file.

The production is binary because its not recommended to have the data in plain text. git-crypt was used to encrypt it. You can safely it and add your own production file, which will be encrypted as soon as you git commit it.

Aplication wide configuration can be found at

Development

Git clone this repository and run make dev. This will bring both API and DATABASE containers up. Your API will be listening on port 3000 and postgres will be on 5432.

Test

The repo is configured to run on CircleCI. The workflow will also deploy the master branch to the server, which is identified via SERVER_USER@SERVER_IP environment variables in CircleCI.

Production

Before running the repository in production, you'll need to:

  • Configure your environment variables via config/environment/production file (remember, this file is, by default, git-crypted)
  • a domain with DNS pointing to the server IP you're running the command

To run the code in production just run make prod. This command will run 4 different containers:

TODOs

  • Manage JWT tokens via Redis
  • GraphQL support

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published