3

Is it possible to create a single Meteor application having multiple domains and displaying different views/layouts depending on that domain?

For example, i have a admin interface accessible on admin.myapp.com and the two domains storeX.com and storeY.com. Both domains should point to the data from admin.myapp.com but displaying the data (mostly) independently of each other.

johipsum
  • 101
  • 1
  • 5

4 Answers4

1

This may not be totally updated to 2014 standards, but I did answer this question before:

How can Meteor handle multiple Virtual Hosts?

And with the same setup, you can use Passenger (for nginx OR apache2) for Meteor. Here's a complete tutorial for using Passenger with Meteor, but keep in mind you have to integrate the multiple virtualhosts/domains to this tutorial yourself.

Community
  • 1
  • 1
Seth Malaki
  • 4,436
  • 23
  • 48
1

Perhaps a better approach would be to use Meteor's Pub/Sub capabilities, rather than sharing a DB per say. It's entirely possible to publish and subscribe across meteor apps, or indeed any implementation using DDP.

http://docs.meteor.com/#/full/ddp_connect

adamwong246
  • 795
  • 9
  • 15
0

You can use the partitioner to send different views of the data to different users based on the domain name they hit.

Dan Dascalescu
  • 143,271
  • 52
  • 317
  • 404
0

See How can I share MongoDB collections between Meteor apps? . Basically the idea is that you build two meteor apps which would share the mongodb and collection(s) data.

Community
  • 1
  • 1
Nate
  • 1,875
  • 15
  • 27