Skip to content

Latest commit

 

History

History
 
 

api

README.md

Setup

  1. Install dependencies
    npm install
  2. Create OAuth credentials for GitHub
  3. Copy .env-file
    cp .env.example .env
    Make sure to generate the app secret and fill out your newly generated OAuth credentials.
    openssl rand -hex 32
  4. If you already have MySQL running using systemd, stop it:
    systemctl stop mysql.service
  5. Start MySQL and Redis (for persistent login sessions)
    docker-compose up -d
  6. Migrate the database. Note that MySQL can take a few seconds to start.
    npx prisma migrate dev
  7. Start the application
    npm run dev

Creating OAuth credentials for GitHub

You should follow this guide.

You will need the following information:

Field Value
Application name Anything you like, I used BTH pattern Group 14 local
Homepage URL http://localhost:4000
Application description Anything you like, can be left empty
Authorization callback URL http://localhost:4000/auth/github/callback

UML / Database structure

UML