dmcg
fun hostContains(s: String) = { request: Request -> request.header("host")?.contains(s) ?: false }.asRouter() val routes = routes( hostContains("<http://value-elf.com|value-elf.com>") bind routes( GET to { request -> Response(OK).body("hello from value-elf") } ), hostContains("<http://priceomatic.com|priceomatic.com>") bind routes( GET to { request -> Response(OK).body("hello from priceomatic") } ), hostContains("<http://webuyanymagicalitem.com|webuyanymagicalitem.com>") bind routes( GET to { request -> Response(OK).body("hello from webuyanymagicalitem") } ), )
A modern programming language that makes developers happier.