I've created a Ktor application with Gradle and I followed the tutorial on https://ktor.io/quickstart/quickstart/gradle.html#initial.
At the end it says:
And then go to Run -> Edit Configurations select the blog.BlogAppKt configuration and change its Main class to: io.ktor.server.netty.EngineMain
Now when we run the new configuration, the application will start again.
I am searching for the option but could not find it:
The gradle file looks as follows:
plugins {
application
kotlin("jvm") version "1.3.61"
}
group = "org.example"
version = "1.0-SNAPSHOT"
val ktor_version = "1.3.0"
repositories {
mavenCentral()
jcenter()
}
dependencies {
implementation(kotlin("stdlib-jdk8"))
compile("io.ktor:ktor-server-netty:$ktor_version")
compile("io.ktor:ktor-server-core:$ktor_version")
compile("ch.qos.logback:logback-classic:1.2.3")
testCompile(group = "junit", name = "junit", version = "4.12")
}
tasks {
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
}
application {
mainClassName = "io.ktor.server.netty.EngineMain"
}
Update
I'v tried following configuration:
But as you can, there is a error message.
What do I have to add to run the Ktor app?