Backend part of redline finance
- node 18+
- docker 20+
npm install
npm run devnpm install
npm run test:service:coveragedocker 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:testingIf 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 upThere are npm scripts to help on database migration:
npm run migrate:make new_script # give a proper name for the migratenpm run migrate:latest # apply all pending migratesnpm run migrate:rollback # undo latest applied migrate batch