Reputation: 567
Apparently you cannot deploy two different servers to one Heroku app - If I knew that on development I would structure the app differently.
So I have 2 servers server1.js
and server2.js
- the main reason they are separated is that one of them is a socket.io server and it wouldn't make sense to share the logic in one server.js
file.
So what I need to do is to deploy 2 different Heroku apps, and connect both of them to the same Heroku project.
How can I do that? would it make sense to create 2 different git repositors for each server and deploy both of them? and if so how can I make sure that both of them are starting when the dyno starts running?
thank you.
Upvotes: 0
Views: 63
Reputation: 18919
While we don't have a full picture of the overall solution, there is really is more reason to share logic in a single api and make use of all the same code and resources than there is to keep them separated.
Some thoughts to consider:
The alternative is to keep separate repositories and run separate apps on Heroku as I don't believe you can run multiple buildpacks of the same type within an app.
Upvotes: 1