- Install any needed dev dependencies:
yarn install
- Boot up local Postgres database (steps differ based on OS)
- If not yet created, create a file named
.env
in the project's base directory. See.env.example
for required properties. - Boot up Typescript compiler:
yarn watch
- Start dev server:
yarn dev
- If you need to add additional properties to the
.env
file, run the following:
yarn gen-env
This will update the .env.d.ts
and .env.example
files with the correct properties and type declarations.
- To run SQL migrations, run the following command:
yarn migrate
This will use Mikro-ORM's migration generator to construct and execute SQL migrations on your database.
Build an Image
docker build -t {username}/{image-name}:{tag-name}
Login with Docker Hub
docker login
Push to Docker Hub
docker push {username}/{image-name}:{tag-name}
https://dokku.com/docs~v0.23.9/deployment/methods/images/#docker-image-tag-deployment
- First, make the
deploy.sh
file executable by running the following:
chmod +x deploy.sh
- Next, simply run the executable on the server:
deploy.sh
To run tests with Mocha
yarn test