Micro API to ping Slack. Why create a wrapper around another API? To secure your Slack for frontend use :) Also ProcFile included for deployment to Heroku. More info: http://udiscover.me/notify-yourself/
- Install Yarn:
$ brew install yarn
- Install node packages:
$ yarn
- Preload your PORT environment variable (Doesn't need to be port 3000):
$ export PORT=3000
. (Micro & Heroku need PORT to be preloaded) - Update
.sample-env
to your slack integration URL and remove thesample-
from the file name. (Info on dotenv) - Run
$ yarn start
username
: Username to post with (use%20
for encoding a space)text
: Message to postemoji
: The avatar for your post
localhost:3000/?username=Uli%20bot&text=hi%20people&emoji=partyparrot
- Install Heroku CLI
- Make sure you are logged in with Heroku.
- Create heroku app
heroku create {optional-name-of-app}
- Make sure your latest commits are pushed to master and deploy by
git push heroku master
- Bonus: If you aren't committing your latest changes to master you can push your latest commit by using
git push heroku HEAD:master