Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 826
johipsum Avatar asked Sep 14 '26 21:09

johipsum


2 Answers

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.

like image 150
Seth Malaki Avatar answered Sep 17 '26 11:09

Seth Malaki


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

like image 38
adamwong246 Avatar answered Sep 17 '26 11:09

adamwong246