Skip to content

Latest commit

 

History

History
93 lines (63 loc) · 3.4 KB

README.md

File metadata and controls

93 lines (63 loc) · 3.4 KB

Gympoint

Gym manager app RESTful API

GoStack License

Getting Started

Prerequisites

You'll need Node, NPM (comes with Node) or Yarn.

Installing

Install dependencies with:

npm install

or

yarn install

Docker

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

Creating the database

  • Run docker exec -it postgres_gympoint_api psql -U your_postgres_user_name to 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

Environmental Variables

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.

Running

Scripts used to run the app:

  • yarn dev: development mode with server auto-reload on code changes
  • yarn dev:debug: development on debug mode with server auto-reload on code changes
  • yarn queue: queue thread that processes jobs
  • yarn 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.

Debugging

VS Code

  1. Run yarn dev:debug or yarn queue:debug (depends on which piece of code you want to debug);
  2. Go to VS Code's debug tab (shift + command + d);
  3. Set your breakpoints throughout the code;
  4. Click "launch program";
  5. That's it!

Running the tests

Explain how to run the automated tests for this system (soon)

Deployment

Add additional notes about how to deploy this on a live system (soon)

Built With

  • 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

License

This project is licensed under the MIT License - see the LICENSE.md file for details