A bot posting a message to Slack with Amazon Dash Button.
Set the following environment variables in .env
file.
MAC_ADDRESS
: media access control address(MAC address) of your dash button. See node-dash-button to find a dash button on your networkBOT_TOKEN
: follow the official instraction here.CHANNEL_ID
: Slack channel id of which you want to post a text to.
Then run the following:
sudo node app.js
Versions:
- macOS High Sierra version 10.13.4
- node v8.11.0
Run the following commands:
$git clone https://github.com/Sean0628/dash_button.git
$cd dash_button
$npm install
- node-dash-button - The library utilizing a dash button to emit an event
- node-slack-sdk - Slack Developer Kit for Node.js
- dotenv - Used to store configuration in the environment separate from code