This is a simple REST API of products with categories, emulating a simple e-commerce, that can be used as a template. The main technologies used are:
- Typescript
- Express
- Prisma
- Docker
- Swagger
- This app is containerized. To start the app locally, up containers:
$ docker compose up -d- To stop, run:
$ docker compose stop-
Create a .env file and copy the .env.example content
-
Install nvm or other node version package manager
-
Make sure you are using node v20.10.0 and install packages
$ nvm use$ npm install- If containers are running, stop them:
$ docker compose stop- Comment the
webandmigrationservices ondocker-compose.ymland run just the database services:
$ docker compose up -d- Run migrations and start local server
$ npm run migrate:generate$ npm run dev- The app is running on localhost:4000/
- End to end tests are not implemented yet, but you can run unit test using:
$ npm test- This app was documented with Swagger. While running this app, you can see the documentation at /docs