Skip to content

Deploy to Heroku

gilpanal edited this page Jun 14, 2020 · 12 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
$ 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 bot.js`

Commands in a normal flow

$ cd beatbytebot
$ cd heroku_stage
$ heroku login
$ git pull

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

  • Copy and paste files for the new version to be deployed. From root folder to heroku_stage/herokureponame
  • Check the value of environment variable MODE at config/env_vars.js
  • Modify .gitignore if necessary to not exclude files in config folder
  • 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