Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hs-slackin

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hs-slackin

A little server that enables public access to a Slack server. Like Freenode, but on Slack.

  • 0.1.6
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-71.43%
Maintainers
1
Weekly downloads
 
Created
Source

slackin

A little server that enables public access to a Slack server. Like Freenode, but on Slack.

It prompts users to join by emailing them an invite to your organization (all of it or just one guest channel) through the Slack API.

You get:

  • A landing page you can point users to (http://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)

How to use

Server

deploy to heroku button here

To launch it:

$ npm install -g slackin
$ slackin --token "token" --org socketio

The available options are:

  • --port [port] – What port to bind to (defaults to 3000)
  • --token [token] (required) – API token for your org. Get it here.
  • --org [org] (required) – Organization subdomain (//this.slack.com)
  • --channel [chan] – If you want users to join just one guest channel within your organization, provide it.
  • --silent - If provided, no errors or warnings are printed out.

Realtime Badge

<script async defer src="http://slackin.yourhost.com/slackin.js"></script>

or for the large version, append ?large:

<script async defer src="http://slackin.yourhost.com/slackin.js?large"></script>

SVG

<img src="http://slackin.yourhost.com/badge.svg">

Landing page

Point to http://slackin.yourhost.com.

Note: the image for the logo of the landing page is retrieved from the Slack API. If your organization doesn't have one configured, it won't be shown.

API

Requiring slackin as a module will return a Function that creates a HTTP.Server instance that you can manipulate.

require('slackin')({
  token: 'yourtoken', // required
  interval: 1000,
  org: 'your-slack-subdomain', // required
  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.

By default logging is enabled.

Credits

  • The SVG badge generation was taken from the excellent shields project.
  • The button CSS is based on github-buttons.

License

MIT

FAQs

Package last updated on 28 Jan 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc