i wonder if routing is not installed or applied ?
# ktor
n
i wonder if routing is not installed or applied ?
i
isn’t that what the
routing { ... }
block is supposed to take care of?
n
i have routes in a seperate file and set up the config to load it
Copy code
@Suppress("unused")
fun Application.routes() {

    routing {
...
   }
}
and add it to the ktor.application.modules in the application.conf
i
Hmm, yeah - but I’m not sure that would change anything material - it just seems like a different way to organize the code. What’s infuriating is that this works just fine in my actual code - it’s just this test code I’m trying to use, which is super-simple and copied verbatim from the documentation - doesn’t work.
n
well there is something not registering the routes i think does your actual code use the integrated netty ?
i
Yes, in both cases I’m using the integrated Netty, this is the code verbatim:
Copy code
val s = embeddedServer(Netty, port = 8080) {
        routing {
            get("/") {
                call.respondText("Hello World!", ContentType.Text.Plain)
            }
            get("/demo") {
                call.respondText("HELLO WORLD!")
            }
        }
    }
    s.start(wait = true)