slack-command-server/README.md

37 lines
1 KiB
Markdown
Raw Permalink Normal View History

2014-08-09 06:21:11 +00:00
slack-command-server
====================
Slack command server is a simple way to build a server that responds to slack slash commands.
2014-08-09 06:51:20 +00:00
2014-08-09 06:40:38 +00:00
Getting Started
===============
1. Clone this repository
2. Configure according to the `Configuration` section
2014-08-09 06:50:37 +00:00
3. Run `node app.js`
2014-08-09 06:51:20 +00:00
2014-08-09 06:21:11 +00:00
Configuration
=============
Configuring the server is simple, you can use any plugin compatible with [slack-command-router](https://github.com/terribly-lazy/slack-command-router), custom or otherwise.
2014-08-09 06:40:38 +00:00
You must define what port for the app to listen on by defining `port: 80`
2014-08-09 06:21:11 +00:00
To use pre-written plugins write your configuration thusly:
```json
{
2014-08-09 23:03:19 +00:00
"plugins": {
"slack-roll-command": {}
}
2014-08-09 06:21:11 +00:00
}
```
Or if you have plugins of your own, you can do this:
```json
{
2014-08-09 23:03:19 +00:00
"local-plugins": {
"directory/to/plugin.js": {}
}
2014-08-09 06:21:11 +00:00
}
```
2014-08-09 06:51:20 +00:00
2014-08-09 06:21:11 +00:00
Notes
=====
Any `plugins` specified in your configuration will be installed through npm upon starting your server, and any
`local-plugins` will will be loaded relative to the directory in which `app.js` resides.