This project was created using the Ktor Project Generator.
Here are some useful links to get you started:
- Ktor Documentation
- Ktor GitHub page
- The Ktor Slack chat. You'll need to request an invite to join.
Here's a list of features included in this project:
| Name | Description |
|---|---|
| Koin | Provides dependency injection |
| Routing | Provides a structured routing DSL |
| Content Negotiation | Provides automatic content conversion according to Content-Type and Accept headers |
| kotlinx.serialization | Handles JSON serialization using kotlinx.serialization library |
| Exposed | Adds Exposed database to your application |
| Authentication | Provides extension point for handling the Authorization header |
| Authentication JWT | Handles JSON Web Token (JWT) bearer authentication scheme |
| CORS | Enables Cross-Origin Resource Sharing (CORS) |
| Swagger | Serves Swagger documentation |
Docker/Docker compose steps:
| Steps | Description |
|---|---|
run |
docker compose up --build |
k6 smoke test |
docker run --rm -it --network="host" -v ./scripts/smoke.js:/scripts/smoke.js -p 5665:5665 -e K6_WEB_DASHBOARD=true grafana/k6 run /scripts/smoke.js |
k6 load test |
docker run --rm -it --network="host" -v ./scripts/load.js:/scripts/load.js -p 5665:5665 -e K6_WEB_DASHBOARD=true grafana/k6 run /scripts/load.js |
k6 spike test |
docker run --rm -it --network="host" -v ./scripts/spike.js:/scripts/spike.js -p 5665:5665 -e K6_WEB_DASHBOARD=true grafana/k6 run /scripts/spike.js |
Services:
| Description | Url |
|---|---|
api |
http://localhost:8080/ |
metrics |
http://localhost:8080/metrics |
prometheus |
http://localhost:9090/ |
grafana |
http://localhost:3001/ |
grafana prometheus datasource |
http://prometheus:9090 |