reitit

https://cljdoc.org/d/metosin/reitit/ https://github.com/metosin/reitit/
idkfa 2020-11-30T14:07:36.371900Z

I'm serving both a REST API and html content (templates with Selmer) and would like to have the api served from http://api.example.com. I would like the API docs at http://api.example.com/ and the home page at http://example.com/ but this means there will be route conflicts. I'm currently getting around this by using a top level path of /v1 for the API routes but was wondering if it's possible to differentiate routes by domain / virtual host? I noticed https://github.com/juxt/bidi#virtual-hosts and the Python Flask framework does too but perhaps most people in this situation serve their API via http://example.com/api?