I have a Procfile file:
web: bundle exec rails server -p $PORT
em: script/eventmachine
The process emfires eventMachine using start_server(port ENV['PORT']), and my web process sometimes needs to communicate with it.
My question is, how does the web process know which port it is talking to? If I understand the hero correctly, he assigns you a random port when the process starts (and it can change if ps is killed or restarted). Thank!
source
share