Skip to content

Commit

Permalink
Finish readme instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
cxcorp committed Jun 29, 2017
1 parent db5d826 commit d45c7a8
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ Antell lunchmenu integration for Flowdock.
Setting up this integration requires:

1. A server for the integration to run on at scheduled intervals
2. A Flowdock source token
2. A Flowdock source flow token
3. A scheduler which runs the script every morning

### tl;dr if you know what you're doing
* `git clone && cd antell-lunchmenu-flowdock && npm i`
* Create flowdock app, get (source) token for your flow
* Set up env vars, see section in this readme
* Set up env vars (.env file), see section in this readme
* run `npm run lunchmenu` every morning

### Hosting on Heroku for free
Expand All @@ -24,12 +24,23 @@ This integration only runs during scheduled intervals for a few seconds, meaning
1. Fork this repository to your Github account
2. Create a new developer application in Flowdock - https://www.flowdock.com/oauth/applications
1. Create the app, tick **Shortcut application**
2. Go to your newly created app and **Create a new source** for the flow which you want menus to be sent. It will give you a 32-character *token* - store this and keep it safe. This token lets the script post messages to your flwo.
2. Sign up for a Heroku account and create a new personal app - https://signup.heroku.com/
1. In the **Deploy tab**, choose Github as the **Deployment method**, then choose the repository you just forked
2. Go to the **Settings** tab

... todo

2. Go to your newly created app and **Create a new source** for the flow which you want menus to be sent. It will give you a 32-character *token* - store this and keep it safe. This token lets the script post messages to your flow.
3. Sign up for a Heroku account and create a new personal app - https://signup.heroku.com/
1. In the **Deploy** tab, choose Github as the *Deployment method*, then choose the repository you just forked
2. Go to the **Settings** tab, reveal the config vars in *Config Variables*, and set up the configuration according to the *Environmental variables* section of this README
3. In the **Deploy** tab, deploy the project in the *Manual deployment* section
4. In the **Resources tab**, disable the `web` dyno. This is created by Heroku by default but we don't use it.
4. Set up the Heroku scheduler
- Go to the **Resources** tab and enable the "Heroku Scheduler" add-on. Schedule the following command: `npm run lunchmenu`
5. Done!

## Environmental variables
This script makes use of environmental variables to configure the flowdock source flow tokens and the Antell website URL.

| Variable name | Value |
|---------------|-------|
| `ANTELL_MENU_URL` | The address of the lunch menu, e.g. http://www.antell.fi/lounaslistat/lounaslista.html?owner=112 |
| `FLOWDOCK_FLOW_TOKEN` | Comma separated array of the tokens of the flows to which you want lunch menus sent |

## License
antell-lunchmenu-flowdock is licensed under the MIT license. See LICENSE.

0 comments on commit d45c7a8

Please sign in to comment.