This ia a backend that serves as the basis for developing an application for territory servant records.
- Add Swagger documentation Api
- Add end to end test per endpoint
- Add unit test
- Use Domain Driven Design methodology
- Use Port and Adapter Architecture
You need to have installed:
- NodeJs
git clone https://github.com/gchnick/territory-api.git
Run following command:
yarn build
Now work into dist folder.
Into write the DATABASE_URL
to SQLITE database and PORT
to run the server.
DATABASE_URL="file:./territory.db"
PORT=8000
Run following command:
yarn install --production=true
To create the database files of SQLITE
following command:
yarn generate-db
Run following command:
yarn start
If there have been updates to the database you can apply them one by one by writing the following command:
npx prisma migrate resolve --applied "MIGRATION_NAME"