A basic API, built using Express server and MongoDB database (with Mongoose ORM), bootstrapped using Google Typescript Style-guide. It contains following endpoints:
GET /testcases
: Returns list of existing test cases.POST /test-case
: Creates a test case, based on following request body:
{
"name": string,
"summary": string,
"description": string
}
Use either of following 2 options:
Docker-compose
(for local dev): Rundocker-compose run --rm express
(requiresdocker-compose
)Kubernetes
(RequiresHelm
and an available Kubernetes cluster):- Package a Helm chart:
helm package helm/ -d charts/
(creates chart in new./charts
directory) - Install the Helm chart:
helm install express-mongo-release charts/express-mongo-0.0.1.tgz
(creates Helm releaseexpress-mongo-release
on available cluster. Caveat: Have tested this only onminikube
locally, not on any cloud (AWS, GCP etc) cluster!)
- Package a Helm chart:
Basic end-to-end tests exist in tests
folder, that can be run via the npm run e2e-tests
script (requires docker-compose
). Tests call the API via Axios
and run via ts-jest
.
Docker image and Helm chart being published via GitHub Actions.
Helm
chart has been created (via Kompose). It can be packaged and installed on Kubernetes
, however Mongo does not store data in a persistent volume or similar.