@firstfleet/ffslack

An easier web callout to a Slack-handling endpoint

Usage no npm install needed!

<script type="module">
  import firstfleetFfslack from 'https://cdn.skypack.dev/@firstfleet/ffslack';
</script>

README

To publish new version to NPM:

  1. Create user on NPM site if you don't already have one. Then login npm login
  2. Have someone add you to the firstfleet NPM org
  3. Increment version in package.json
  4. Publish it! npm publish --access public

How to use in node project:

  1. Install to your project npm install -s @firstfleet/ffslack
  2. Require in your controller const slack = require('@firstfleet/ffslack')
  3. Example call to post to slack: slack.PostToSlack("Your app name", "Error message", <slack channel name or ID>, "userID: " & req.param.user;
  4. set SlackPosterURL environment variable to https://api.firstfleetinc.com/myportal/utility/slack/postToSlack

*The Slack channel names and IDs are mapped in IntegrationSupport.dbo.AppErrorTypes