Hey Krešimir
Thank you :) Yes, Heroku respects Procfile and uses web process as the default web server. https://devcenter.heroku.com/articles/procfile
But why two files? Because of different processes used in different environments. It’s possible we can keep the same file for both, and Heroku will basically run the web process and keep others off, but personally it feels it’s best to keep them separate like we do with rails environment configs, a separate config per environment. Also, say we have a completely different process on production, which one doesn’t use in development then we will be bound to run that too if we use the same Procfile.
Ohh, both are basically the same thing, but when using rails s, it binds the server to localhost, however, using just puma uses 0.0.0.0 that allows Heroku to bind a public IP to that address.
We can’t use localhost on production as then the site won’t be available to end users on a different machine. Another option is to use the same command but use -b flag to specify 0.0.0.0 as bind address. Therefore, I just used puma executable in production, seems simple.
