Sergey Aldoukhov
10/16/2024, 6:39 PMjoffrey
10/16/2024, 7:26 PMmacos/app
product type for this purposejoffrey
10/16/2024, 7:32 PMlib
and then have one module for each application with the corresponding product type.Sergey Aldoukhov
10/17/2024, 8:20 PMjoffrey
10/17/2024, 8:26 PMSergey Aldoukhov
10/17/2024, 8:30 PMproduct: macos/app
dependencies:
- io.ktor:ktor-server-core:2.3.12
- io.ktor:ktor-server-cio:2.3.12
and then
00:03.958 INFO :kstatic:compileMacosArm64 Calling konanc -g -ea -produce library -module-name kstatic -target macos_arm64 -Xmulti-platform -language-version 1.9 -api-version 1.9 -output
00:05.271 ERROR :kstatic:compileMacosX64
.../src/main.kt:1:8: error: unresolved reference: io
00:05.276 ERROR :kstatic:compileMacosX64 import io.ktor.server.application.*
Sergey Aldoukhov
10/17/2024, 8:31 PMimport io.ktor.server.application.*
import io.ktor.server.engine.*
import io.ktor.server.cio.*
import io.ktor.server.response.*
import io.ktor.server.routing.*
fun main() {
embeddedServer(CIO, port = 8080, host = "0.0.0.0", module = Application::module)
.start(wait = true)
}
fun Application.module() {
routing {
get("/") {
call.respondText("Hello World!")
}
}
}
Sergey Aldoukhov
10/17/2024, 8:32 PMjoffrey
10/17/2024, 9:26 PM