Skip to content

Deploy to Heroku

gilpanal edited this page Jun 14, 2020 · 4 revisions

In case you want to deploy and test in a public domain. More info: https://devcenter.heroku.com/articles/getting-started-with-nodejs?singlepage=true

Standard commands for the first time:

$ cd beatbytebot_api
$ heroku login
$ mkdir heroku_stage (if this folder it's not created)
$ cd heroku_stage
$ heroku git:clone -a "herokureponame" (or `heroku create`)

Create `Procfile` file if it's not created with the following: `web: node src/api.js`

Commands in a normal flow

$ cd beatbytebot_api
$ cd heroku_stage
$ heroku login
$ git pull heroku master

Manual process (this will be executed via script in the future):

  • Copy and paste files for the new version to be deployed. From src folder to heroku
  • Modify .gitignore or remove it to not exclude config.js
  • Update package.json if the changes are relevant like a new node module
$ heroku local web
$ git status
$ git add .
$ git commit -am "make it better"
$ git push heroku master

Clone this wiki locally