-
-
Notifications
You must be signed in to change notification settings - Fork 4
Backend Development
En Rong edited this page Nov 19, 2022
·
1 revision
Refer to our main wiki page on the setup instructions.
Area | Choice | What is it |
---|---|---|
Language | TypeScript | Statically typed JavaScript |
Backend Framework | Nest.js | A progressive Node.js framework for building efficient, reliable and scalable server-side applications. |
ORM | Objection.js | An SQL-friendly ORM (Object Relation Mapping) for Node.js |
SQL Query Builder | Knex.js | Build SQL queries for App logic and migrations |
Database | PostgreSQL | Popular open source relational database |
We currently have a rough set of end-to-end (e2e) tests for the backend:
- You can run them via
yarn test:e2e --force-exit
- TODO: Let's aim to get our backend test coverage up with more comprehensive testing
-
cd
to thebackend
directory yarn migrate:make <migration-description>
- You can refer to the past migration files on how to write these migrations using Knex.js
- Run
yarn migrate
after completing the migration file. - You might find these additional commands useful during development:
-
npx knex migrate:down
: Undos the last migration that was run -
npx knex migrate:up
: Runs the next chronological migration that has yet to be run
-
-
cd
to thebackend
directory yarn seed:make <seed-file-name>
- You can refer to the past seed files on how to write these database seeds using Knex.js
- Run
yarn seed
after completing the seed file-
WARNING: run this with caution as
yarn seed
will wipe your existing database table entries for the corresponding seeded tables
-
WARNING: run this with caution as