slack-samples / bolt-js-custom-step-template

A template for building automations with Bolt for JavaScript
MIT License
3 stars 1 forks source link

feat: reload and reconnect the app process after updating files #31

Closed zimeg closed 4 months ago

zimeg commented 4 months ago

Type of change

Summary

This PR automatically reloads the process and reconnects the Socket Mode connection after a file is changed. All in hopes of improving the development experience.

Reviewers

$ slack create asdf -t slack-samples/bolt-js-custom-function-template -b zimeg/feat-start-reload
$ cd asdf
$ slack run           # Run the app in some separate window
$ vim app.js          # Make a change to the app and watch a reload
$ vim manifest.json   # Update the manifest and notice the app is reinstalled
$ slack delete
$ cd .. && rm -rf asdf

Notes

Requirements

zimeg commented 4 months ago

@seratch appreciate the approval for this! From some discussion it sounds like documenting this as a possibility is the approach we're going with for now. I like the idea from @WilliamBergamin in slack-samples/bolt-python-custom-functions#19 of including this in hooks, but see how that comes with maintenance burden...

Hoping to have this documented somewhere sometime soon, but will close this PR for the time being.