This demonstration service exemplifies the application of domain-driven design and hexagonal architecture in modeling diverse use cases for scooter rental businesses. In this showcase, the Ktor framework has been employed to facilitate comparison with the well-established Spring services.
- Java 17
- Docker
- Clone the repository
git clone git@github.com:sergiocmgit/ktor-demo.git
- Build the image
./gradlew build
- Build the docker image
./gradlew buildImage
- Run the application
./gradlew runDocker
curl -X GET "http://localhost:8080/users"
curl -X GET "http://localhost:8080/scooters"
curl -X POST "http://localhost:8080/scooters/2/lock/A"
curl -X POST "http://localhost:8080/scooters/3/run/A"
curl -X POST "http://localhost:8080/scooters/1/run/B"
curl -X POST "http://localhost:8080/scooters/1/run/C"
curl -X POST "http://localhost:8080/scooters/4/run/A"
curl -X POST "http://localhost:8080/scooters/3/run/A"