Skip to content

Commit

Permalink
docs: add LICENSE, minor docs
Browse files Browse the repository at this point in the history
  • Loading branch information
drmohundro committed Oct 2, 2023
1 parent 91ea898 commit 23f236f
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 10 deletions.
20 changes: 20 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyright (c) 2017 Clear Function

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 changes: 15 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Bolt](https://api.slack.com/bolt). It allows users to play mp3 clips on a Sonos
speaker. It communicates with [Sonos Proxy](https://github.com/clearfunction/sonos_proxy_nodejs)
which then communicates with [node-sonos-http-api](https://github.com/jishi/node-sonos-http-api).

We affectionately refer this as "Burn Bot."
We affectionately refer to this as "Burn Bot."

## Architecture

Expand All @@ -18,21 +18,28 @@ sequenceDiagram

## Requirements

* Yarn
* Node
- Yarn
- Node

## Running Locally

The easiest way to test is to set this up in a standalone Slack instance and
then use ngrok.
then use a local proxy like [ngrok](https://ngrok.com/).

- Create a Slack application (see Slack Bolt API link below)
- Run `yarn dev` (it defaults to port 3000)
- Run ngrok to create a proxy to your Bolt app (`ngrok serve 3000`)
- Point your Slack's event subscription to your ngrok URL
- Set up [Sonos Proxy](https://github.com/clearfunction/sonos_proxy_nodejs)
- Enjoy!

## Deployment

See the `Makefile`... make sure you are in the expected subscription by running `az account set --subscription YOUR_SUBSCRIPTION_ID`.

## Resources

* [Slack Bolt API](https://slack.dev/bolt/)
* [Block Kit Builder](https://api.slack.com/tools/block-kit-builder)
* [Sonos Proxy](https://github.com/clearfunction/sonos_proxy_nodejs)
* [node-sonos-http-api](https://github.com/jishi/node-sonos-http-api)
- [Slack Bolt API](https://slack.dev/bolt/)
- [Block Kit Builder](https://api.slack.com/tools/block-kit-builder)
- [Sonos Proxy](https://github.com/clearfunction/sonos_proxy_nodejs)
- [node-sonos-http-api](https://github.com/jishi/node-sonos-http-api)
5 changes: 3 additions & 2 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ const app = new App({
attachResponses(app, sonos);

(async () => {
const server = await app.start(Number(process.env.PORT) || 3000);
const port = Number(process.env.PORT) || 3000;
const server = await app.start(port);
sonos.initialize(server, app);

console.log('⚡️ Bolt app is running!');
console.log(`⚡️ Bolt app is running on ${port}!`);
})();

0 comments on commit 23f236f

Please sign in to comment.