- Gradle
- Kotlin
- Docker
Name | Description |
---|---|
HTTP_HOST |
default 0.0.0.0 |
HTTP_PORT |
default 8080 |
DATABASE_NAME |
|
DATABASE_HOST |
default 0.0.0.0 |
DATABASE_PASSWORD |
|
DATABASE_USER |
./gradlew clean build
./gradlew test
- Build the docker image
docker build . -t microservice-kotlin-boilerplate
- Run the image
docker run -p 8080:8080 microservice-kotlin-boilerplate
Use Google Style for the coding style guide.
Use ktlint to check style.
brew install shyiko/ktlint/ktlint
Apply ktlint to IDEA built-in formatter (optional): ktlint --apply-to-idea
To create a release which will be deployed to production follow the following steps:
-
on master branch, create tag
git tag -a fix-v1.0.3 -m 'fix: issue#100' git push origin refs/tags/fix-v1.0.3
-
use git-chglog to generate the changelog
git-chglog 1.0.0..2.0.0
copy this content to CHANGELOG.md
-
create new release in GitHub and copy generated changelog for the tag to notes
- url:
/api/example/{id}
- method:
GET
- description:
- query parameters:
- {id}:
int
, id
- {id}:
- return on success: example
{ "example": 3 }
- return on error: (i.e. 400 error)
{ "error": "id parameter not provided" }
- return on error: internal server error (i.e. 500 error)
{ "error": "server error" }
Licensed under MIT.