a094f51171 | ||
---|---|---|
assets | ||
migrations | ||
seeds | ||
src | ||
.envsample | ||
.gitignore | ||
LICENSE | ||
README.md | ||
index.js | ||
knexfile.js | ||
package.json |
README.md
captain-hook
a slack bot to subscribe to npm webhook notifications
usage
/captain-hook subscribe <type: package||organization> <name> <sharedsecret>
local dev
captain-hook
is a NodeJS application. if you don't have NodeJS
you'll need to download it.
captain-hook
uses a Postgres database.
up and running
- Fork and clone this repo
cd captain-hook
npm install
- Copy
.envsample
to.env
and fill it out
variable | description |
---|---|
SLACK_API_TOKEN | Bot API token. You can find this on the Slack Developers site by navigating: Browse Apps > Custom Integrations > Bots Configurations on {{team_name}} > Edit configuration |
SLACK_CHANNEL_ID | Name of the channel, i.e. #testing. Can also be ID number retrieved from the Slack API. |
SHARED_SECRET | Any string. |
DATABASE_URL | URL of your Postgres database. defaults to localhost:5432/dev |
npm db:setup
, creates a Postgres db, then runs Knex migrations and seedsnpm run dev
, runsnpm start
and pipes output to nice logging You now have a service running onlocalhost:6666
. You'll probably want to expose that to the internet for local development.ngrok
is a great, free option.