Guys I have moved my backend to KMP, it is uses kt...
# server
m
Guys I have moved my backend to KMP, it is uses ktor with SQLDeleight When I run it on local with
./gradlew :backend:run
everything works as expected I can reach it by
<http://127.0.0.1:8080/endpoint>
it reposes. I have created a fat jar and run in my server but I can not get response when i
<http://IP_ADRESS:8080/endpoint>
the main is below
Copy code
// Configs
private const val PORT = 8080
private const val HOST = "127.0.0.1"

fun main() {
....
    embeddedServer(
        Netty,
        port = PORT,
        host = HOST
    ) {

        routing {
         ....
        }
    }.start(wait = true)
}
What can be the reason, I have allowed my port also
c
not very familiar with ktor but it looks like you're only listening on 127.0.0.1
m
shouldn’t be the right case for server ? I was doing same for my Kotlin Springboot app on server
h
You should use the default ip, which is 0.0.0.0. Especially with docker, 127.0.0.1 does not work
m
ohh let me try with 0.0.0.0 too
🔥 Thanks a lot! That’s working