Any ideas on how subdomain routing can be achieved with meteor?
Or would it be best to use a reverse proxy such as nginx or HAproxy?
i can use something like /?s=subdomain in nginx
But that seems like a hacky way to achieve what should be possible with the router
I ahve no idea what the caveats will be (being new to meteor)and whether it can be counted on in a produciton environment w/high traffic(the routing call I mean).
any idea how meteor achieve his on their server?
EDIT: specifically how to achieve http://subdomain.example.com routing to Collection.content.find({'domain':'subdomain'})
EDIT #2 : I have achieved this using nginx, solution to follow. but please see this question which answers most of my concerns and gives me a way to also achieve this with node : nginx vs node-http-proxy.
It would probably be best to look into something like node-http-proxy to solve your problem. I had a similar routing problem (when bundled and deployed) and it solved mine!
https://github.com/nodejitsu/node-http-proxy/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With