Skip to content
This repository has been archived by the owner on Jul 14, 2020. It is now read-only.

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
seratch committed Jul 19, 2019
0 parents commit fcddc1d
Show file tree
Hide file tree
Showing 11 changed files with 4,028 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# package directories
node_modules
jspm_packages

# Serverless directories
.serverless

# Webpack directories
.webpack

.env

.DS_Store

.vscode
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
(The MIT License)

Copyright (c) Kazuhiro Sera

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.
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: npm start
50 changes: 50 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Slack Rain Clouds Rader (雨雲レーダー) App on Heroku

[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/seratch/slack-rain-clouds-rader/tree/master)

## Slack ⚡️ Bolt

A framework to build Slack apps, fast.

* https://slack.dev/bolt
* https://github.com/SlackAPI/bolt

## Yahoo! JAPAN 雨雲レーダー表示 API

* https://developer.yahoo.co.jp/webapi/map/openlocalplatform/v1/static.html#exp_weather

## How to build

### Create a Slack App

https://api.slack.com/apps

* Features > OAuth & Permissions:
* Scopes:
* "files:write:user"
* Click "Save Changes"
* Features > Slash Commands:
* Click "Create New Command"
* Command
* Set `/amesh`
* Request URL
* Set `https://{your app name}.herokuapp.com/slack/events`
* Short Description
* Set something helpful for users
* Click "Save"
* Features > Bot User:
* Click "Add a Bot User"
* Click "Add Bot User"
* Settings > Install App:
* Complete "Install App"

### Deploy to Heroku

[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/seratch/slack-rain-clouds-rader/tree/master)

* Set env variables on Heroku
* (Slack) Settings > Basic Information > App Credentials > Siginging Secret
* (Slack) Settings > Install App > Bot User OAuth Access Token
* (Yahoo! JAPAN) Application ID (https://e.developer.yahoo.co.jp/dashboard/)

[![Heroku deployment page](https://raw.githubusercontent.com/seratch/slack-rain-clouds-rader/master/deploy_to_heroku.png)](https://heroku.com/deploy?template=https://github.com/seratch/slack-rain-clouds-rader/tree/master)
3 changes: 3 additions & 0 deletions _env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export SLACK_SIGNING_SECRET=cda6e9cbf46a********************
export SLACK_BOT_TOKEN=xoxb-************-************-************************
export YAHOO_JAPAN_API_CLIENT_ID=dj00aiZpP****************************************
25 changes: 25 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "Slack Amesh Backend",
"description": "Slack Amesh",
"repository": "https://github.com/seratch/slack-rain-clouds-rader",
"keywords": [
"Slack",
"Slack API",
"Heroku"
],
"env": {
"SLACK_SIGNING_SECRET": {
"description": "Slack Signing Secret - https://api.slack.com/apps",
"value": "cda6e9cbf46a********************"
},
"SLACK_BOT_TOKEN": {
"description": "Slack App Bot Token - https://api.slack.com/apps",
"value": "xoxb-************-************-************************"
},
"YAHOO_JAPAN_API_CLIENT_ID": {
"description": "Yahoo! JAPAN Application ID - https://e.developer.yahoo.co.jp/dashboard/",
"value": "cda6e9cbf46a********************"
}
},
"image": "heroku/nodejs"
}
Binary file added deploy_to_heroku.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit fcddc1d

Please sign in to comment.