Skip to content
Public Slack organizations made easy
JavaScript Shell CSS Dockerfile
Branch: master
Clone or download
2
Latest commit f520543 Jul 23, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.bluemix Update the message ids for the slackin parameters Oct 3, 2018
bin Implement reCAPTCHA for abuse prevention (#311) Jun 1, 2017
lib Fix gcaptcha in badges/iframe mode (#353) Dec 19, 2017
scripts
test Supports letsencrypt challenges (#239) Sep 26, 2016
.gitignore Include dist in deploy. Fix #221. (#223) Feb 9, 2017
.travis.yml Add .travis.yml Feb 24, 2016
Dockerfile Implement reCAPTCHA for abuse prevention (#311) Jun 1, 2017
HISTORY.md Release 0.13.0 Jul 20, 2016
Procfile Implement reCAPTCHA for abuse prevention (#311) Jun 1, 2017
app.json Implement reCAPTCHA for abuse prevention (#311) Jun 1, 2017
azuredeploy.json Deploy to Azure Button Jan 6, 2016
gulpfile.babel.js Switch to args, lint code and clean up (#200) Jun 17, 2016
license.md Lowercased text files Jun 7, 2017
package.json fix: vulnerable packages (#344) Dec 19, 2017
readme.md Update readme.md Jul 22, 2019
web.config Deploy to Azure Button Jan 6, 2016

readme.md

Features

  • A landing page you can point users to fill in their emails and receive an invite (https://slack.yourdomain.com)
  • An <iframe> badge to embed on any website that shows connected users in realtime with socket.io.
  • A SVG badge that works well from static mediums (like GitHub README pages)
  • Abuse prevention via Google reCAPTCHA

Usage

Badges

Realtime (demo)

<script async defer src="https://slack.yourdomain.com/slackin.js"></script>
<!-- append "?large" to the URL for the large version -->

SVG (demo)

<img src="https://slack.yourdomain.com/badge.svg">

API

Loading slackin will return a Function that creates a HTTP.Server instance:

const slackin = require('slackin')

slackin.default({
  token: 'yourtoken',                             // required
  interval: 1000,
  org: 'your-slack-subdomain',                    // required
  path: '/some/path/you/host/slackin/under/',     // defaults to '/'
  channels: 'channel,channel,...',                // for single channel mode
  silent: false                                   // suppresses warnings
}).listen(3000)

This will show response times from Slack and how many online users you have on the console. The returned http.Server has an app property that is the express application that you can define or override routes on.

All the metadata for your organization can be fetched via a JSON HTTP request to /data.

Caught a Bug?

  1. Fork this repository to your own GitHub account and then clone it to your local device
  2. Uninstall slackin if it's already installed: npm uninstall -g slack
  3. Link it to the global module directory: npm link
  4. Transpile the source code and watch for changes: npm start

Yey! Now can use the slack command everywhere.

You can’t perform that action at this time.