It provides the RESTful API
Node, Express, Vite, Prisma, TypeScript, Vitest, pre-commit, Docker
Using docker-compose
to start service and database together, no need to set up the development environment in local
docker-compose up -d --build
Using asdf
/ mise
to manage all the runtime and tool version, which is defined in .tool-versions
asdf install
pnpm install
docker-compose up -d postgis
pnpm run dev
# Request the Health Check API
curl -i -X GET \
-H "X-User-Role:Contributor" \
-H "X-User-Name:name" \
'http://localhost:3000/api/v1/health'
# Output should like {"status":"Running","dateTime":"2024-08-13T11:18:11+08:00"}
Using Prisma's Model/Entity-first migration
pattern to generate / manage migrations like below flow:
# Running below command after you have updated the model definition in ./prisma/schema.prisma
pnpm run db:generate
# Instead of restarting the service, we can deploy the migration manually here
pnpm run db:deploy
Note: If you have the issue to run repository tests in you terminal or other place
Please find the command and details according to your container runtime ref to this article