You'll need Node, NPM (comes with Node) or Yarn.
Install dependencies with:
npm install
or
yarn install
To run this app's database you'll need to install Docker and Docker Compose. Then you should run docker-compose up to install all images and start up the services.
PS: don't forget to fill out the docker-compose.example.yml and rename it to docker-compose.yml
- Run
docker exec -it postgres_gympoint_api psql -U your_postgres_user_nameto acess your postgress CLI - Inside Postgres, run
CREATE DATABASE gympoint;to create your database - Exit with
\q - At root folder, run all migrations with
yarn sequelize db:migrate - At root folder, load all seeds with
yarn sequelize db:seed:all
You are provided with a .env example file called .env.example, where all sensitive data and some setup data should be stored at. Please fill out the missing data and rename the example file to .env.
Scripts used to run the app:
yarn dev: development mode with server auto-reload on code changesyarn dev:debug: development on debug mode with server auto-reload on code changesyarn queue: queue thread that processes jobsyarn queue:debug: queue thread on debug mode
PS: you should always keep both yarn dev and yarn queue running if you want the API and queue jobs to run.
- Run
yarn dev:debugoryarn queue:debug(depends on which piece of code you want to debug); - Go to VS Code's debug tab (
shift + command + d); - Set your breakpoints throughout the code;
- Click "launch program";
- That's it!
Explain how to run the automated tests for this system (soon)
Add additional notes about how to deploy this on a live system (soon)
- Node - JavaScript runtime built on Chrome's V8 JavaScript engine
- Express - Fast, unopinionated, minimalist web framework for Node.js
- Sequelize - promise-based Node.js ORM for Postgres, MySQL, MariaDB, SQLite and Microsoft SQL Server
- JWT - open, industry standard RFC 7519 method for representing claims securely between two parties
- Redis - open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker
- Postgres - open source object-relational database system
- Docker - tool designed to make it easier to create, deploy, and run applications by using containers
- Docker Compose - tool for defining and running multi-container Docker applications
- Bee-Queue - Redis-backed job queue for Node.js
This project is licensed under the MIT License - see the LICENSE.md file for details
