You need Node v14+, you can install Node here. You also need a PostgreSQL DB (instructions here).
Copy .example.env
and rename it to .env
, then fill out the environment variables for the DB.
After starting the server by following the below instructions, the API docs can be found at http://localhost:5000/api.
Installs all dependencies
To run the server, by default this creates a server running on http://localhost:5000
Checks if linting and prettier and Typescript compilation checks pass, AND auto-fixes problems.
Checks if linting and prettier and Typescript compilation checks pass.
Runs all unit tests
Runs all e2e tests, requires a running DB.
Runs the seed files in the correct order so that you have data in your database for development!
Runs a specific seed file.
Runs all migrations in migrations folder that have not been recorded yet.
Automatically generates a migration based off changes to TypeORM entities.
Example usage: npm run miration:create -- -n "createdUserProfiles"
Drops your database. Do not do this unless you really need to! Does not reinitialize the database with a schema. If you want to just reset things use npm run reset-db
or npm run schema:drop && npm run migration
.
Clears the database schema, runs migrations, then reseeds database. If you just need a fresh database with the original seed data, then use this command.