- A running Postgres database
- Node.js runtime environment
- Copy
.env.example
to.env
and modifyDATABASE_URL
and Postgres settings accordingly. - Inside project directory run
docker compose up --abort-on-container-exit
(depending on docker version it might bedocker-compose
).
You can access documentation from here http://localhost/api/documentation
- Inside project directory run
yarn install
. - Modify
.env
file according to your settings. - To apply database migrations
yarn prisma migrate deploy
- Run backend by running
yarn start
You can access documentation from here http://localhost:3000/documentation
Technology | Usage |
---|---|
Node | JavaScript runtime |
TypeScript | Type safety |
Express | Minimalist web framework |
Jest | Testing framework |
Prisma | Next generation ORM |
Swagger | Visualize and interact with API's |
Postgres | Database |
- I wasn't able to mock prisma client so tests are meant to fail.
- Extending API, takes too much human labor. There should be probably way to generalize pagination, filtering.