See <#C0A974TJ9|ktor> btw but I'd probably run one...
# server
m
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
Thanks for the #ktor ... didn't have this one yet
o
No need to do two services. You can have a route on a header value, which in this case would be
Host
header.
Like
Copy code
route {
    header(HttpHeaders.Host, "<http://api.example.com|api.example.com>") { … }
}
👍 1
p
Thanks a lot! By looking at this I also see, that we can write custom RouteSelectors. 👍