Variable Name | Required | Value |
---|---|---|
NODE_ENV | ❌ | development |
DOMAIN | ❌ | localhost |
PORT | ❌ | 3001 |
LOG_LEVEL | ❌ | debug |
DB_HOST | ✅ | postgres://localhost:5433/ |
COMMIT_HASH | ❌ | aou32b9e2d |
CORS_URLS | ❌ | "https://www.my-website.de" |
PGSSLMODE | ✅ | "disable" or "no-verfiy" for heroku |
Create a .env.local
file for local overrides.
The docker-compose file starts a local PostgreSQL server to run against - don't forget to set the DB_HOST
environment variable!
Start the server in production mode
Start the server with node debugging enabled: https://chrome.google.com/webstore/detail/nodejs-v8-inspector-manag/gnhhdgbaldcilmgcpfddgdbkhjohddkj?hl=en
Start the server with debugging and refresh if file changes happen
Run tests while watching changes
Run tests and quit after execution
Create a build in the dist folder with typescript definition files
To create a migration:
node -r @swc-node/register node_modules/.bin/knex migrate:make table_name
To run all migrations:
npx knex migrate:latest
To run all seeds:
npx knex seed:run