GithubHelp home page GithubHelp logo

alexxnica / slackin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rauchg/slackin

0.0 1.0 0.0 351 KB

Public Slack organizations made easy

Home Page: http://rauchg.com/slackin/

License: MIT License

JavaScript 91.48% CSS 3.62% Shell 4.91%

slackin's Introduction

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)

Check out the Demo or read more about the motivations and history behind Slackin.

Usage

Set up Now on your device and run this command:

$ now -e SLACK_API_TOKEN="<token>" -e SLACK_SUBDOMAIN="<team-name>" now-examples/slackin

Other platforms:

Tips

Your team id is what you use to access your login page on Slack (eg: https://{this}.slack.com).

You can find or generate your API test token at api.slack.com/web โ€“ note that the user you use to generate the token must be an admin. You need to create a dedicated @slackin-inviter user (or similar), mark that user an admin, and use a test token from that dedicated admin user. Note that test tokens have actual permissions so you do not need to create an OAuth 2 app. Also check out the Slack docs on generating a test token.

Important: If you use Slackin in single-channel mode, you'll only be able to invite as many external accounts as paying members you have times 5. If you are not getting invite emails, this might be the reason. Workaround: sign up for a free org, and set up Slackin to point to it (all channels will be visible).

Badges

Realtime (demo)

<script async defer src="https://slack.yourdomain.com/slackin.js"></script>
<!-- append "?" 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:

import slackin from '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.

slackin's People

Contributors

rauchg avatar afeld avatar balupton avatar leo avatar evilrabbit avatar laughinghan avatar jomo avatar jtatum avatar jszwedko avatar maxwofford avatar elliottsj avatar mcmahoniel avatar darron avatar limulus avatar hardeep avatar jpoon avatar lvnilesh avatar ssandler avatar heyjohnford avatar alansouzati avatar andrewsardone avatar arunthampi avatar bnjmnt4n avatar brianloveswords avatar imbstack avatar crobinson42 avatar davsket avatar egid avatar esteinborn avatar frabrunelle avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.