Skip to content

Application to track personal profit and losses when using Fintual app

License

Notifications You must be signed in to change notification settings

cristobalgvera/fintual-tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

NPM Version Package License NPM Downloads CircleCI Coverage Discord Backers on Open Collective Sponsors on Open Collective Support us

Description

Nest framework TypeScript starter repository.

Installation

$ yarn install

❗ Database

The project persist data using TypeORM. To accomplish this, it uses migrations as a database versioning system. It's important to follow the convention in order to encourage the maintainability of the project.

Every migration generated or created is located in the migrations folder.

The easiest way to make use of this migrations system is to follow the workflow proposed below. It make extensive use of the custom scripts located in the package.json file

Workflow

The workflow to proper modify the database schema is the following:

  1. Make changes to your entities.
  2. Run npm run migration:generate --name=YourMigrationName -- --dr and watch the generated output. If it is correct, proceed to the next step, else go back and make changes to your entities again.
  3. Run npm run migration:generate --name=YourMigrationName.
  4. Do one of these:
    • Launch the app building it before (npm run build and then npm run start:dev).
    • Run the migration manually using npm run migration:run
  5. Check your changes in the database. If there are unwanted changes, run npm run migration:revert, remove the previously generated file, and start again.
  6. Commit your changes.

Migration related scripts

# generate migration based on your changes
$ npm run migration:generate --name=YourMigrationName

# generate migration in dry run (don't write anything)
$ npm run migration:generate --name=YourMigrationName -- --dr

# create an empty migration file
$ npm run migration:create --name=YourMigrationName

# run migrations manually
$ npm run migration:run

# revert last migration
$ npm run migration:revert

Running the app

# development
$ yarn run start

# watch mode
$ yarn run start:dev

# production mode
$ yarn run start:prod

Test

# unit tests
$ yarn run test

# e2e tests
$ yarn run test:e2e

# test coverage
$ yarn run test:cov

Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.

Stay in touch

License

Nest is MIT licensed.