Skip to content

Latest commit

 

History

History
57 lines (44 loc) · 1.5 KB

README.md

File metadata and controls

57 lines (44 loc) · 1.5 KB

Clug Backend

Requirments

  • Node v12 or greater
  • A Postgres database

Installation

# First install dependencies
npm ci

# Then set up your environment
cp .env.example .env
nano .env

# Lastly, you can run project in dev mode
npm run watch-debug

Avaiable documented npm scripts

  • npm run build Create a build for the project
  • npm run serve Will serve the project from the build
  • npm run test Will run test from the build
  • npm run watch-debug Serve and watch the project
  • npm run watch-test Run test and watch for change
  • npm run migration:run Run the migration for the db
  • npm run migration:rollback Rollback last executed migration
  • npm run clug Execute a custom clug script (see next section)

Avaible custom clug script

  • npm run clug -- create-user [ARGS] Create a new user in the database

Docker thing

docker-compose down --rmi local -v //Delete all containers docker-compose up -d //Build containers

Seed database

  1. docker-compose exec backend sh
  2. npm run clug seeds

libs used

database

testing

utils

JWT