xiongchuandeMacBook-Pro:Hello xiongchuan$ vapor heroku init
Would you like to provide a custom Heroku app name?
y/n> y
Custom app name:
swiftbear
Would you like to deploy to a region other than the US?
y/n> n
https://swiftbear.herokuapp.com/ | https://git.heroku.com/swiftbear.git
Would you like to provide a custom Heroku buildpack?
y/n> n
Setting buildpack...
Are you using a custom Executable name?
y/n> n
Setting procfile...
Error: GeneralError(message: "Unable to locate vapor dependency")
Don't use the vapor heroku commands to set up your Heroku application, they simply don't work anymore – and the Toolbox hasn't seen a maintenance release for a long while...
Instead, do the steps manually. Judging from the output, the app was created and the buildpack was set, so all that's left is to create a Procfile then commit and push to Heroku.
Create a file called Procfile at the project folder with the following contents:
web: Run --env production --hostname 0.0.0.0 --port $PORT
Then push it:
git add .
git commit -m "Add Procfile"
git push heroku master
Thank you,it works.
Most helpful comment
Don't use the
vapor herokucommands to set up your Heroku application, they simply don't work anymore – and the Toolbox hasn't seen a maintenance release for a long while...Instead, do the steps manually. Judging from the output, the app was created and the buildpack was set, so all that's left is to create a Procfile then commit and push to Heroku.
Create a file called Procfile at the project folder with the following contents:
Then push it: