Template for a RESTful api with most of the setup pre configured
-
Make a fork of this repo
-
Create a spark bot
-
Create a (free hobby-dev) heroku web app
-
Change the name field in app.json to match your heroku app name (probably optional)
-
Configure the Heroku environment variables as follows:
TOKEN=Your bot's access token
PERSON_ID=Your bot's personId
ADMIN_ROOM=An admin room ID - your bot will use this space for persistent storage
ADMIN_ID=Your personal spark ID - So your bot knows when you're talking to it
ADMIN_TOKEN=Your personal spark token - so your bot can read all the messages you can
-
Setup Heroku to autodeploy from pushes to your github repo
-
Deploy Heroku instance
-
Add bot into a room and type "hook me up". This registers a webhook on your spark account to send all messages seen to the bot.