I am trying to change from `0.0.0.0` to `0.0.0.0/...
# ktor
d
I am trying to change from
0.0.0.0
to
0.0.0.0/project_name
but while running I'm getting
java.nio.channels.UnresolvedAddressException
What's the correct way to change host URL?
a
You can use
host
method of a
Route
to match requested host and port:
Copy code
routing {
    host("<http://example.com|example.com>") {
        handle {
            call.respondText { "For <http://example.com|example.com>" }
        }
    }
}
You can find more information here https://github.com/ktorio/ktor/issues/1077.
👍 1
d
Thank you