This is an API built for Pockets.
- Node.js using the Express.js framework.
- I picked Express.js as I know it the best and I think for my requirements it suits them.
- TypeScript
- I decided on TypeScript well for its types.
- Prisma ORM
- I decided to use Prisma mainly for its ease of use and great schema and migration tools. I was going to use something like Knex.js, a lower level query builder, but for this project, I think making use of Prisma's magic works.
- Postgres
- I picked Postgres because I think it's great 👌
- Jest
- I chose to use Jest for familiarity, but I did consider Mocha for its speed.
To run the app in development follow these steps:
- Add files to your local editor.
- Docker
- First check you have docker installed
- Run the command
docker-compose up
to see logs ordocker-compose up -d
to not see logs. - Run Prisma migrations by running the command
npx prisma migrate dev
- Node server
- Run the command
npm run dev
to start the server
- Run the command
After this you should now be able to use the API.
- Run server -
npm run dev
- Run Posgres via Docker -
docker-compose up -d
- Run dev migrations -
npx prisma migrate dev