5

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.

Community
  • 1
  • 1
Paul Harwood
  • 53
  • 1
  • 4
  • one can use Backbone package and use Backbone's router or use meteorite and this atmosphere package: https://github.com/tmeasday/meteor-router – imslavko May 28 '13 at 23:37
  • Yes, I understand the routing concept, but I was specifically asking about the ability for meteor to affect the domain name e.g. http://subdomain.example.com routing to a query on a collection. – Paul Harwood May 29 '13 at 09:14

1 Answers1

1

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/

Kendrick Ledet
  • 673
  • 6
  • 9
  • 1
    Actually this answer below answers most of my concerns, and they also just recently added regex support for domains too :) http://stackoverflow.com/questions/13309425/nginx-vs-node-http-proxy – Paul Harwood May 29 '13 at 21:53