8000 docs(examples): fix the "deploy to heroku" button using latest dependencies by zimeg · Pull Request #2385 · slackapi/bolt-js · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

docs(examples): fix the "deploy to heroku" button using latest dependencies #2385

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Jan 9, 2025

Conversation

zimeg
Copy link
Member
@zimeg zimeg commented Jan 8, 2025

Summary

This PR checks out the heroku example of a Bolt JS app and smoothes edges found when testing!

Reviewers

These changes are available on this forked branch: zimeg/bolt-js/tree/main/examples/deploy-heroku

The "Deploy to Heroku" button at the end links to slackapi/bolt-js - the following link can be used to test these changes: https://dashboard.heroku.com/new?template=https://github.com/zimeg/bolt-js

The included manifest can be used to create a Slack app for the bot token and signing secret 🔒

Requirements

@zimeg zimeg added the area:examples issues related to example or sample code label Jan 8, 2025
@zimeg zimeg added this to the 4.x milestone Jan 8, 2025
@zimeg zimeg self-assigned this Jan 8, 2025
Copy link
Member Author
@zimeg zimeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Notes for the kind reviewers!


### 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)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think having this button in a subdirectory is causing strange redirects. It's replaced with the redirected result here, which I find to be working well 🙏

https://devcenter.heroku.com/articles/heroku-button#adding-the-heroku-button

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This link worked for me 💯

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 I'm finding that navigating directly to the link (that was removed) works, but clicking it from the following pages doesn't:

main: https://github.com/slackapi/bolt-js/blob/main/examples/deploy-heroku/README.md
fork: https://github.com/zimeg/bolt-js/blob/main/examples/deploy-heroku/README.md

@@ -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!');
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 From the logs!

2025-01-08T18:18:40.258427+00:00 heroku[web.1]: Starting process with command `node app.js`
2025-01-08T18:18:40.933034+00:00 app[web.1]: [INFO]  bolt-app ⚡️ Bolt app is running!
2025-01-08T18:18:41.379963+00:00 heroku[web.1]: State changed from starting to up

@@ -27,7 +27,7 @@
"formation": {
"web": {
"quantity": 1,
"size": "free"
"size": "eco"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The free tier is no longer an option and caused errors on setup - https://www.heroku.com/pricing

"features": {
"bot_user": {
"display_name": "Bolt on Heroku Example",
"always_online": true
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related to the eco dyno that can sleep - I think it's alright to suppose the bot is always online. It just might be slow to response 🤔

Copy link
codecov bot commented Jan 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.59%. Comparing base (44cde97) to head (660dc18).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2385   +/-   ##
=======================================
  Coverage   92.59%   92.59%           
=======================================
  Files          36       36           
  Lines        7472     7472           
  Branches      653      653           
=======================================
  Hits         6919     6919           
  Misses        545      545           
  Partials        8        8           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor
@WilliamBergamin WilliamBergamin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job these changes look good 💯
I did not test the deployment first hand, but trust you have!


### 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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This link worked for me 💯

@zimeg
Copy link
Member Author
zimeg commented Jan 9, 2025

@WilliamBergamin 🙏 Thanks for reviewing!

I've tested this a few times and am feeling confident with the setup for now, but will confirm things are working after merging 🚢 💨

@zimeg zimeg merged commit 2d26011 into slackapi:main Jan 9, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:examples issues related to example or sample code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0