Hi , I need some help with the initial ktor setup, I created a project from Intellij templates which gave me an initial application code:
Copy code
fun main() {
embeddedServer(Netty, port = 8080, host = "127.0.0.1", module = Application::module)
.start(wait = true)
}
fun Application.module() {
configureSecurity()
configureHTTP()
configureMonitoring()
configureSerialization()
configureDatabases()
configureRouting()
}
and running staus is [DefaultDispatcher-worker-1] INFO ktor.application - Responding at http://127.0.0.1:8080, same when host is "0.0.0.0" but when i redirect to http://127.0.0.1:8080 on my browser. I get an error stating "Safari cannot open the page". how can I fix this?
a
Arun M
04/30/2023, 10:10 AM
Hope you are not running on VM or Docker?
try host="0.0.0.0" and try with http://localhost and your machine IP (you can find using ipconfig/ifconfig).
If it doesn't work, if the port is accessible via telnet.
telnet localhost(and your private IP as well) 8080