This repository has been archived on 2018-04-23 . You can view files and clone it, but cannot push or open issues or pull requests.
develop
vodopija-bot
A bot to remind you to drink plenty of water.
Development
1. Install dependencies
$ npx yarn
2. Set environment variables
2.1. Generate Facebook Verify Token
$ export FB_VERIFY_TOKEN=$(tr -dc 'a-zA-Z0-9' < /dev/urandom | fold -w 32 | head -n 1)
$ echo Facebook Access Token: $FB_VERIFY_TOKEN
2.2 Set App Secret
$ export FB_APP_SECRET=''
2.3. Set Facebook Access Token
$ export FB_ACCESS_TOKEN=''
2.4 Set local dev server port
$ export PORT=3000
3. Run the local dev server
$ npx yarn run dev
4. Point ngrok to that local dev server
$ npx ngrok http $PORT -region eu
5. Point the Facebook webhook to the ngrok tunnel
https://SOME_RANDOM_ID.ngrok.io/api/v1/facebook/
6. Start chatting with your bot
6.1 Monitor your requests
Upgrade package versions
$ npx yarn upgrade-interactive --latest
Description
Languages
JavaScript
100%