Backend part of redline finance
- node 18+
- docker 20+
npm install
npm run dev
npm install
npm run test:service:coverage
docker build -f infrastructure/Dockerfile -t sombriks/redline-api:testing .
You can change the postgres database url for proper test values:
docker run --rm -it -p 3000:3000 --network=host \
-e PG_CONNECTION_URL=postgresql://postgres:postgres@localhost/redline \
sombriks/redline-api:testing
If you don't have a suitable postgres installation, there is a docker compose just for that:
docker compose -f infrastructure/test-database-docker-compose.yml up
There are npm scripts to help on database migration:
npm run migrate:make new_script # give a proper name for the migrate
npm run migrate:latest # apply all pending migrates
npm run migrate:rollback # undo latest applied migrate batch