Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Simple Node.js based REST API to add a BTC ticker to a Slack chatroom

Notifications You must be signed in to change notification settings

hkarthik/slack-btc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Slack BTC ticker

This project is a simple Express.js based web API to use with Slack inbound webhooks. It is used to add a Bitcoin ticker to your channel's Slackbot.

It adds a simple BTC ticker which lists the current USD price of a Bitcoin by checking bitstamp.net and sending back in the right format for a Slack inbound Webhook.

Env vars

A few ENV vars need to be set for this to work:

  • SLACKHOST = Your slack site's hostname.
  • SLACK_PATH = Usually /services/hooks/incoming-webhook
  • SLACK_TOKEN = Your integration's token

The included .env.example lists these out and can be used as a template.

Usage

Make an HTTP GET to /ticker to push the current BTC price to Slack.

Deployment

This project can easily be deployed to Heroku, just set the appropriate ENV Vars and go!

Tests

This project utilizes Runscope to test the webhooks via mocha.js. Run the tests with the following command:

mocha -R spec

About

Simple Node.js based REST API to add a BTC ticker to a Slack chatroom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published