Skip to content

Pathf/gamify-back

Repository files navigation

GAMIFY BACK

example workflow

It is a backend used to execute actions or manage data. This is for my friends and me.

Installation

Consider intalling docker (docker desktop for windows).

$ pnpm install

Create a ".env" file at the root with this data for the local testing (Do not put production data for local testing) :

ENVIRONEMENT="LOCAL"

# MAILER
RESEND_MAILER_KEY="key"

# SWAGGER
SWAGGER_PASSWORD="password"

# BDD
POSTGRES_HOST="localhost"
DB_PORT=5432
POSTGRES_USER="postgres"
POSTGRES_PASSWORD="password"
POSTGRES_DATABASE="POSTGRES_DB"

# AUTH
JWT_SECRET="secret"

# GOOGLE
GOOGLE_REGISTER_REDIRECT_URL="..."
GOOGLE_CLIENT_ID="..."
GOOGLE_SECRET="..."
GOOGLE_REDIRECT_URL="..."

Running the app

# run local (prepare a container docker with postgres db. See in src/tests/setup/docker-compose.yml)
$ pnpm run start

# Build app on local
$ pnpm run build

Tests and before commit

# unit tests
$ pnpm run test

# integration tests (run docker desckop before run integrations tests and assert than app does not run)
$ pnpm run test:int

# All tests (run docker desckop before run all tests)
$ pnpm run test:all

# before commit (for linter and format file)
$ pnpm run lf
or
$ pnpm run fl

License

Gamify-back by Valentin Hénique is licensed under Creative Commons Attribution-NonCommercial 4.0 International