Skip to content

Commit

Permalink
docs(examples): fix the "deploy to heroku" button using latest depend…
Browse files Browse the repository at this point in the history
…encies (#2385)
  • Loading branch information
zimeg authored Jan 9, 2025
1 parent 44cde97 commit 2d26011
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 13 deletions.
8 changes: 4 additions & 4 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
"name": "Deploying to Heroku ⚡️ Bolt for JavaScript",
"description": "This is a Slack app built with the Bolt for JavaScript framework that showcases deploying to the Heroku platform.",
"keywords": ["slack", "heroku", "nodejs", "bolt", "bolt-js", "javascript"],
"logo": "https://raw.githubusercontent.com/slackapi/bolt-js/main/docs/assets/bolt-logo.svg",
"logo": "https://raw.githubusercontent.com/slackapi/bolt-js/main/docs/static/img/bolt-logo.svg",
"image": "heroku/nodejs",
"website": "https://tools.slack.dev/bolt-js/",
"repository": "https://github.com/slackapi/bolt-js",
"success_url": "/",
"env": {
"SLACK_SIGNING_SECRET": {
"description": "Slack creates a unique string for your app and shares it with you. Verify requests from Slack with confidence by verifying signatures using your signing secret. (begins with xoxb-)",
"description": "Slack creates a unique string for your app and shares it with you. Verify requests from Slack with confidence by verifying signatures using your signing secret.",
"value": "",
"required": true
},
"SLACK_BOT_TOKEN": {
"description": "Bot tokens represent a bot associated with the app installed in a workspace. Unlike user tokens, they're not tied to a user's identity; they're just tied to your app.",
"description": "Bot tokens represent a bot associated with the app installed in a workspace. Unlike user tokens, they're not tied to a user's identity; they're just tied to your app. Begins with 'xoxb-'.",
"value": "",
"required": true
},
Expand All @@ -27,7 +27,7 @@
"formation": {
"web": {
"quantity": 1,
"size": "free"
"size": "eco"
}
},
"buildpacks": [
Expand Down
10 changes: 5 additions & 5 deletions examples/deploy-heroku/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ heroku ps:scale web=1
### 5. Create Slack App

1. Follow the [Getting Started with Bolt for JavaScript][4] guide to:
- Create a Slack app
- Add required scopes
- Subscribe to required events
- Create a Slack app
- Add required scopes
- Subscribe to required events
2. Follow the [Deploying to Heroku with Bolt for JavaScript][1] guide to:
- Update your **Request URL** for actions and events
- Update your **Request URL** for actions and events

### 6. Bonus: Deploy to Heroku with one click

[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/slackapi/bolt-js)
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://dashboard.heroku.com/new?template=https://github.com/slackapi/bolt-js)

[1]: https://tools.slack.dev/bolt-js/deployments/heroku/
[2]: https://tools.slack.dev/bolt-js/
Expand Down
2 changes: 1 addition & 1 deletion examples/deploy-heroku/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ app.message('goodbye', async ({ message, say }) => {
// Start your app
await app.start(process.env.PORT || 3000);

console.log('⚡️ Bolt app is running!');
app.logger.info('⚡️ Bolt app is running!');
})();
29 changes: 29 additions & 0 deletions examples/deploy-heroku/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"display_information": {
"name": "Bolt on Heroku Example"
},
"features": {
"bot_user": {
"display_name": "Bolt on Heroku Example",
"always_online": true
}
},
"oauth_config": {
"scopes": {
"bot": ["channels:history", "chat:write", "groups:history", "im:history", "mpim:history"]
}
},
"settings": {
"event_subscriptions": {
"request_url": "https://example-app-101.herokuapp.com/slack/events",
"bot_events": ["message.channels", "message.groups", "message.im", "message.mpim"]
},
"interactivity": {
"is_enabled": true,
"request_url": "https://example-app-101.herokuapp.com/slack/events"
},
"org_deploy_enabled": false,
"socket_mode_enabled": false,
"token_rotation_enabled": false
}
}
5 changes: 2 additions & 3 deletions examples/deploy-heroku/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
"main": "app.js",
"scripts": {
"ngrok": "ngrok http 3000",
"start": "node app.js",
"test": "echo \"Error: no test specified\" && exit 1"
"start": "node app.js"
},
"license": "MIT",
"dependencies": {
"@slack/bolt": "^3"
"@slack/bolt": "^4.2.0"
}
}

0 comments on commit 2d26011

Please sign in to comment.