Skip to content

TarasMakarchuk/financial-accounting-api

Repository files navigation

NodeJS NestJS RxJS Typeorm TypeScript Postgres Webhook Swagger JWT NPM Postman Git WebStorm

Description 📑

This application is a financial manager that helps keep track of the owner's finances.

Installation ☕


Setup environment on the Server🔧

# .env file settings 
1. Create inside server dir file .env
2. Copy content from .env.dist to .env
3. Change the data in the .env file to required
$ npm install

Running the app 🚀

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Migrations 🚚

# generate a new migration
$ npm run migration:generate src/db/migrations/new_migration_name

# run migrations
$ npm run migration:run

Test 🐛

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

Running the app and the database in the Docker 🐋

Change in the .env file variable 
from 
POSTGRES_HOST=localhost 
to 
POSTGRES_HOST=docker-host-db
# build the container
$ docker-compose build

# start the container
$ docker-compose up

# stop the container
$ docker-compose down