Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/matheusvellone/nodejs-concept-api
https://github.com/matheusvellone/nodejs-concept-api
Last synced: 6 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/matheusvellone/nodejs-concept-api
- Owner: matheusvellone
- Created: 2019-07-20T14:52:42.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-23T23:43:02.000Z (almost 2 years ago)
- Last Synced: 2024-10-16T11:10:05.121Z (3 months ago)
- Language: JavaScript
- Size: 2.72 MB
- Stars: 10
- Watchers: 1
- Forks: 0
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
NodeJS Concept Api
------------------# Features
- Global Error Handling
- JWT Tokens
- Social Logins
- Password hashing with [bcrypt](https://www.npmjs.com/package/bcrypt)
- Input validation with [joi](https://www.npmjs.com/package/joi)
- [Production Console](/docs/console.md)
- Specific code for each response## Requirements
- `docker`
- `docker-compose`
- [`git-crypt`](https://github.com/AGWA/git-crypt)
- `make` (optional, but recommended)## Configuration
You can configure all environment variables for your environment via the [`config/environment`](/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](https://github.com/AGWA/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](https://circleci.com).
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-crypt`ed)
- a domain with DNS pointing to the server IP you're running the commandTo run the code in production just run `make prod`.
This command will run 4 different containers:
- [`jwilder/nginx-proxy`](https://github.com/jwilder/nginx-proxy)
- [`jrcs/letsencrypt-nginx-proxy-companion`](https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion)
- the api, with pm2 as the process manager
- and the postgres database# TODOs
- Manage JWT tokens via Redis
- GraphQL support