How to write a Procfile for deploying node.js heroku using bin / www?

I am trying to deploy a Heroku application and I believe that procfile may be the reason that my application does not deploy. I have tried several solutions, including:

web: node./bin/www web: npm start

There may be another reason why my application does not work, but I want to make sure my Procfile is configured correctly

+4
source share
2 answers

This is what I have:

  • A file in the root directory of the project with a name Procfile(without file extension)
  • Inside the file, the first line reads web: bin/web
  • bin, rood , web node ./bin/www (, , ).
  • bin www, node.
  • bin , , chmod +x file_name

Procfile

, Procfile : web: bin/web

  • web: - web Heroku, :)
  • bin/web -

, :)

+4

:

web: ./bin/www npm start

, !

0

All Articles