Browse Source

add a heroku deploy button

Outsider 10 years ago
parent
commit
001ccd295e
3 changed files with 25 additions and 3 deletions
  1. 2 0
      README.md
  2. 20 0
      app.json
  3. 3 3
      config.js

+ 2 - 0
README.md

@@ -8,6 +8,8 @@ Inspired by
 and
 [Socket.io's slack page](http://socket.io/slack/).
 
+[![Deploy to Heroku](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)
+
 ## Setting
 fill out `config.js` as your infomation.
 

+ 20 - 0
app.json

@@ -0,0 +1,20 @@
+{
+  "name": "Slack Invite Automation",
+  "description": "A tiny web application to invite a user info your slack team.",
+  "repository": "https://github.com/outsideris/slack-invite-automation",
+  "keywords": ["node", "slack", "invite"],
+  "env": {
+    "COMMUNITY_NAME": {
+      "description": "Your team name",
+      "value": "YOUR TEAM NAME"
+    },
+    "SLACK_URL": {
+      "description": "Your slack url(ex: socketio.slack.com)",
+      "value": "YOUR-TEAM.slack.com"
+    },
+    "SLACK_TOKEN": {
+      "description": "access token of slack, You can generate it in https://api.slack.com/web#auth",
+      "value": ""
+    }
+  }
+}

+ 3 - 3
config.js

@@ -1,8 +1,8 @@
 module.exports = {
   // your cummunity or team name to display on join page.
-  community: 'YOUR-TEAM-NAME',
+  community: process.env.COMMUNITY_NAME || 'YOUR-TEAM-NAME',
   // your slack team url (ex: socketio.slack.com)
-  slackUrl: 'YOUR-TEAM.slack.com',
+  slackUrl: process.env.SLACK_URL || 'YOUR-TEAM.slack.com',
   // access token of slack
   // You can generate it in https://api.slack.com/web#auth
   //
@@ -10,5 +10,5 @@ module.exports = {
   //   curl -X POST 'https://YOUR-SLACK-TEAM.slack.com/api/users.admin.invite' \
   //   --data 'email=EMAIL&token=TOKEN&set_active=true' \
   //   --compressed
-  slacktoken: 'YOUR-ACCESS-TOKEN'
+  slacktoken: process.env.SLACK_TOKEN || 'YOUR-ACCESS-TOKEN'
 };