dimsuz
10/29/2018, 5:12 PM1.0.0-beta-3 and kotlin 1.3.0, but I cant run the server.
I try this:
$ ./gradlew run
> Task :run FAILED
Exception in thread "main" java.lang.IllegalArgumentException: Neither port nor sslPort specified. Use command line options -port/-sslPort or configure connectors in application.conf
at io.ktor.server.engine.CommandLineKt$commandLineEnvironment$environment$1.invoke(CommandLine.kt:121)
at io.ktor.server.engine.CommandLineKt$commandLineEnvironment$environment$1.invoke(CommandLine.kt)
at io.ktor.server.engine.ApplicationEngineEnvironmentBuilder.build(ApplicationEngineEnvironment.kt:95)
at io.ktor.server.engine.ApplicationEngineEnvironmentKt.applicationEngineEnvironment(ApplicationEngineEnvironment.kt:40)
at io.ktor.server.engine.CommandLineKt.commandLineEnvironment(CommandLine.kt:50)
at io.ktor.server.netty.EngineMain.main(EngineMain.kt:16)
Although I have perfectly valid port in `resources/application.conf`:
ktor {
deployment {
port = 8080
}
application {
modules = [ com.example.ApplicationKt.module ]
}
}
What am I doing wrong?Deactivated User
10/29/2018, 5:13 PMmainClassName in the build.gradle?cy
10/29/2018, 5:13 PMDeactivated User
10/29/2018, 5:14 PMdimsuz
10/29/2018, 5:15 PMapplication {
mainClassName = "io.ktor.server.netty.EngineMain"
}dimsuz
10/29/2018, 5:15 PMdimsuz
10/29/2018, 5:15 PMAlso need to ensure that there is application.conf in the result classes/jarHow would I check this?
dimsuz
10/29/2018, 5:18 PMcy
10/29/2018, 5:22 PMcy
10/29/2018, 5:23 PMcy
10/29/2018, 5:24 PMkotlin.sourceSets["main"].resources.srcDirs("resources") is not enoughDeactivated User
10/29/2018, 5:26 PMDeactivated User
10/29/2018, 5:27 PMdimsuz
10/29/2018, 6:18 PMtar.gz message above because I discovered that I shared a .git along with it, which contains a private urlDeactivated User
10/29/2018, 6:34 PMbuild.gradle using plain groovy instead of Kotlin DSL until I find the right way to set up the resources folderdimsuz
10/29/2018, 6:38 PMDeactivated User
10/30/2018, 5:08 AMsourceSets["main"].resources.srcDir("resources") instead of kotlin.sourceSets["main"].resources.srcDir("resources")dimsuz
10/30/2018, 4:37 PM