Reputation: 11755
I am rereading this tutorial
https://devcenter.heroku.com/articles/getting-started-with-nodejs#introduction
to polish my understanding of Node.js/Heroku
.
There is a section called Define a Procfile.
But when I go to see my own apps to check what is inside this file. I see that a number of apps (not all) have no such a file and are working fine.
So, what is going on? When is Procfile
necessary? What happens if there is none?
When is it better to have one?
Upvotes: 0
Views: 1328
Reputation: 2143
To help you get started, Heroku will try to automatically detect the type of your app and start it appropriately, even when it doesn't have a Profile (see example here - http://blog.taylorrf.com/blog/2014/12/15/heroku-default-server/ ).
For example in Node, if you have an index.js
file and a package.json
file, it's probably a node app that could be started with node index.js
.
While convenient, this is considered bad practice, because:
Upvotes: 1