igorvd
02/14/2019, 5:12 PMapplication.conf
modules = [ com.example.ApplicationKt.module, com.example.user.UserModuleKt.module ]
and create this extension into the UserModule file:
package com.example.user
fun Application.module() {
routing {
route("/users") {
get {
call.respondText("Users", ContentType.Text.Plain)
}
}
}
}
when I try to conect to the /users endpoint, I'm getting a 404 error 😕cy
02/14/2019, 5:19 PMigorvd
02/14/2019, 5:26 PMcy
02/14/2019, 5:28 PMigorvd
02/14/2019, 5:32 PMApplication.kt
file works, with this content:
fun main(args: Array<String>) {
val server = embeddedServer(Netty, port = 9000) {
routing {
trace { application.log.trace(it.buildText()) }
get("/") {
call.respondText("Hello World!", ContentType.Text.Plain)
}
}
}
server.start(wait = true)
}
/users
from the other file and paste here, works toocy
02/15/2019, 8:45 AMigorvd
02/15/2019, 5:03 PM