johipsum
johipsum

Reputation: 101

Single Meteor application having multiple domains

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.

Upvotes: 3

Views: 1543

Answers (4)

adamwong246
adamwong246

Reputation: 795

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

Upvotes: 1

Seth Malaki
Seth Malaki

Reputation: 4486

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.

Upvotes: 1

Nate
Nate

Reputation: 1875

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.

Upvotes: 0

Dan Dascalescu
Dan Dascalescu

Reputation: 151926

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

Upvotes: 0

Related Questions