Ensure you have nodejs and yarn installed, then:
yarn
Set up a local postgres database, then run (in this repository's root):
cp .env.example .env
Fill the .env
file with the url to the local database and the localhost port the server should run on.
To transpile to javascript:
yarn build
To watch for changes and automatically transpile:
yarn watch
Then, to run it locally (and update on code changes - make sure yarn watch is running in a terminal):
yarn dev
To run locally without watching for code changes:
yarn start
Before a commit is made, all .ts
and .js
files will automatically be linted by eslint and formatted by prettier.
To run those checks manually:
yarn lint
yarn format
Before a push is made, the code will be type checked to ensure there are no typescript issues.
To run this check manually:
yarn type-check
To generate typescript types for the .env
file, run:
yarn gen-env
Make sure a .env
file with information inside exists, otherwise the .env.template
and types might be made blank.
For entities and migrations, refer to the typeorm documentation.
For controllers, refer to routing-controllers.