https://kotlinlang.org logo
Title
m

mp

10/09/2018, 2:02 PM
See #ktor btw but I'd probably run one service that listens on two ports for that case... it's basically vhosting but less of a pain (and easier to manage in local dev too -- no /etc/hosts modifications etc)
p

peekandpoke

10/09/2018, 2:07 PM
Thanks for the #ktor ... didn't have this one yet
o

orangy

10/09/2018, 3:13 PM
No need to do two services. You can have a route on a header value, which in this case would be
Host
header.
Like
route {
    header(HttpHeaders.Host, "<http://api.example.com|api.example.com>") { … }
}
👍 1
p

peekandpoke

10/09/2018, 6:06 PM
Thanks a lot! By looking at this I also see, that we can write custom RouteSelectors. 👍