Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Feature Request: Running multiple instances of the same Meteor app in development? #6532
From my perspective, this would be pretty cool:
If I try this right now, my second instance gets the following output:
I imagine this is because it's trying to rebuild on top of the code that has already been built and is executing?...
I'm doing 3 meteor packages - one of them, which the other two relies on, is polling the database to let other server-instances know it's online. When an instance goes down, other instances will clean up the data the dead instance left behind. My other two packages sprinkle some user presence on top of this functionality, allowing server-instances to set users as online, and marks them with a unique instance ID, so that other instances can take them offline in case that instance goes down.
Developing this package, I'm trying out different ways of doing this efficiently, and it's really hard to develop when I can't have multiple copies of the same codebase running at the same time.
Scaling out applications horizontally, if you're developing packages that allow this, it's beneficial to be able to run multiple copies in development as well. Having to make copies of the codebase, bump version number with every minor change to have them reflected across apps with the local package installed, is tiring - and it would be really nice to just have multiple copies of the same thing running at the same time!
This is really easy to do in Node, and I hope that's the case (or will be) with Meteor as well!
Is that descriptive enough, or is there anything I could add to this to make my use case clearer?
I think the easiest way to achieve this would be to have Meteor use some other directory as the
Note, this doesn't work right now - I'm just presenting an idea for how it could work if it were implemented.
@Goatic yeah the thing I wrote isn't an actual thing you can do today, it would be a new feature to be added. I'm hoping someone can do this via a pull request.
Basically you would need to modify this line:
And have it read from
added a commit
Apr 8, 2016
pushed a commit
May 2, 2016
On Meteor 1.5 I get an error when trying to run two instances of Meteor, on two different ports, out of the same directory.
The mondo server is run from
I run the command
They both need to talk to the same DB.
@aadamsx I see two problems given the configuration you've shown here, though you've excluded the actual error message and indication of whether you have
That being said: First, Meteor doesn't just always use port 3001 for Mongo but instead uses
More clarity here would be helpful to assist you!