Skip to content

Commit

Permalink
Quick leo
Browse files Browse the repository at this point in the history
  • Loading branch information
leo authored Nov 30, 2016
1 parent 6e27199 commit e94f64b
Showing 1 changed file with 13 additions and 60 deletions.
73 changes: 13 additions & 60 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,65 +29,33 @@ Other platforms:
- [OpenShift](https://github.com/rauchg/slackin/wiki/OpenShift)
- [IBM Bluemix](https://bluemix.net/deploy?repository=https://github.com/rauchg/slackin)


### The Command

Install it and launch it on your server:

```bash
$ npm install -g slackin
$ slackin "your-team-id" "your-slack-token"
```
### 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](https://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](https://get.slack.help/hc/en-us/articles/215770388-Creating-and-regenerating-API-tokens).

**Important: if you use Slackin in single-channel mode, you'll only be
**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).**

(all channels will be visible).

### Realtime Badge
### Badges

[![](https://cldup.com/IaiPnDEAA6.gif)](http://slack.socket.io)
#### Realtime ([demo](https://cldup.com/IaiPnDEAA6.gif))

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

or for the large version, append `?large`:

```html
<script async defer src="https://slack.yourdomain.com/slackin.js?large"></script>
```

### SVG

[![](https://cldup.com/jWUT4QFLnq.png)](http://slack.socket.io)
#### SVG ([demo](https://cldup.com/jWUT4QFLnq.png))

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

Done in Markdown this looks like:

[![Slack Status](https://slack.yourdomain.com/badge.svg)](https://yourdomain.com)


### Landing page

[![](https://cldup.com/WIbawiqp0Q.png)](http://slack.socket.io)

Point to `https://slack.yourdomain.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
Expand All @@ -114,33 +82,18 @@ The returned `http.Server` has an `app` property that is
the `express` application that you can define or override
routes on.


### JSON

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

If you wish to turn on CORS, pass `-x` or `--cors` to `slackin`.

## Caught a Bug?

## Developing

Slackin's server side code is written in ES6. It uses babel to transpile the
ES6 code to a format node understands. After cloning Slackin, you should
install the prerequisite node libraries with npm:

```bash
$ npm install
```

After the libraries install, the postinstall script will run `gulp` to invoke
babel on the source. It is important to run `gulp` manually after updating any
files in lib/ to update the versions in node/.


## Credits
1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
2. Uninstall list 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`

- The SVG badge generation was taken from the
excellent [shields](https://github.com/badges/shields) project.
- The button CSS is based on
[github-buttons](https://github.com/mdo/github-buttons).
Yey! Now can use the `slack` command everywhere.

0 comments on commit e94f64b

Please sign in to comment.