Find file Copy path
8b152ec Feb 13, 2020
1 contributor

Users who have contributed to this file

49 lines (44 sloc) 1.13 KB


How To Deploy you API to Heroku

If you don't have a Heroku account sign up for it at (

Initialize your app

heroku create your-heroku-app-name

Re-init your git

git init

make sure you set up your heroku path

heroku git:remote -a your-heroku-app-name

set your buildpack to nodejs

heroku buildpacks:set heroku/nodejs
heroku addons:create heroku-postgresql:hobby-dev --app=your-heroku-app-name

check your status in case you need to commit

git status
git commit -am "add any pending changes"
git push heroku master
heroku run npx sequelize-cli db:migrate
heroku run npx sequelize-cli db:seed:all

possible errors:

app crashed at '/' or '/api' might be caused by not having a start script in your package.json

also "nodemon server.js" needs to be changed to "node server.js" since you specified nodejs as your buildpack

common error codes

( (