Projects playground ktor Files
Enable build support by adding .onedev-buildspec.yml
gradle/wrapper Loading last commit info...
src/main
.gitignore
README.md
build.gradle.kts
gradle.properties
gradlew
gradlew.bat
settings.gradle.kts
README.md

ktor-sample

This project was created using the Ktor Project Generator.

Here are some useful links to get you started:

Features

Here's a list of features included in this project:

NameDescription
CORSEnables Cross-Origin Resource Sharing (CORS)
RoutingProvides a structured routing DSL
AuthenticationProvides extension point for handling the Authorization header
Authentication JWTHandles JSON Web Token (JWT) bearer authentication scheme
Request ValidationAdds validation for incoming requests
Status PagesProvides exception handling for routes
Content NegotiationProvides automatic content conversion according to Content-Type and Accept headers
kotlinx.serializationHandles JSON serialization using kotlinx.serialization library
ExposedAdds Exposed database to your application
PostgresAdds Postgres database to your application
Dependency InjectionEnables dependency injection for your server

Building & Running

To build or run the project, use one of the following tasks:

TaskDescription
./gradlew testRun the tests
./gradlew buildBuild everything
buildFatJarBuild an executable JAR of the server with all dependencies included
buildImageBuild the docker image to use with the fat JAR
publishImageToLocalRegistryPublish the docker image locally
runRun the server
runDockerRun using the local docker image

If the server starts successfully, you'll see the following output:

2024-12-04 14:32:45.584 [main] INFO  Application - Application started in 0.303 seconds.
2024-12-04 14:32:45.682 [main] INFO  Application - Responding at http://0.0.0.0:8080
Please wait...
Page is in error, reload to recover