Deployment

Deploying a Bottender server is as easy as deploying a regular Node server.

In this section, following fast and simple ways of deployment are introduced:

Note that these services have limited free dynos. If your bots need to be up 24/7, you should consider paid plans or other services.

Now

You can set vars in bottender.config.js as environment vars and secrets.

Secrets

$ now secret add my_verify_token 1qaz2wsx

You can list, rename and remove your secrets by following commands:

$ now secret ls
$ now secret rename my_verify_token verify_token
$ now secret rm my_verify_token

Environment Variables

Use @var to set the environment variable with your now secrets.

$ now -e VERIFY_TOKEN=1qaz2wsx
$ now -e VERIFY_TOKEN=@verify_token

Deploy

$ now

List Project

$ now ls

Alias

Make alias to set your customized domain.

$ now alias zeit-suslhdzwiy.now.sh workshop // workshop.now.sh
$ now alias zeit-suslhdzwiy.now.sh bottender.com // upgrade plan

Heroku

You can deploy your bot on Heroku simply using Heroku CLI after creating a new app.

$ heroku login

Creating a New Git Repository

$ cd my-project/
$ git init
$ heroku git:remote -a your-app-name // for existing repositories, simply add heroku remote

Setting Node Version

Make sure your Node version on Heroku is higher than 7.6.0. These lines can be added in package.json to specify the Node version.

"engines": {
  "node": ">= 7.6.0"
}

Deploy

$ git add .
$ git commit -am "make it better"
$ git push heroku master