Reputation: 183
I am trying to deploy a Heroku app, and I believe the procfile may be the reason my app is not deploying. I've tried multiple solutions including:
web: node ./bin/www web: npm start
There may be another reason my app is not working, but I want to make sure my Procfile is set up correctly
Upvotes: 10
Views: 19508
Reputation: 571
You should do:
web: ./bin/www npm start
This is what fixed it for me!
Upvotes: 6
Reputation: 3701
This is what I have:
Procfile
(no file extension)web: bin/web
bin
directory which is also located in the rood directory of the project, I have a file called web
and inside I have node ./bin/www
(well I have more, but lets keep it simple). bin
directory called www
where I have the code to start the node server.bin
directory needs to be executable, and you can set this by doing chmod +x file_name
As mentioned above, in the Procfile I have this line: web: bin/web
where
web:
- is the name of the process, and needs to be web
for Heroku to like you :)bin/web
- is the path to your fileI hope this helps :)
Upvotes: 5