You are browsing as a guest. Sign up (or log in) to start making projects!

1h 19m 8s logged

Today was a wild ride building and deploying Friday Bot. The goal was to create a Slack bot that handles slash commands like math calculations and status updates while also backing it up with a clean Express API.Things did not go smoothly at first. Whenever I typed a command in Slack, it just gave me a frustrating error saying the app did not respond. I spent way too long digging into socket mode configurations. Turns out my app level token was missing the required connection scopes, and my local server was completely silent because nothing was actively listening down the websocket.Adding a global error handler to the code saved me. It finally surfaced what was breaking under the hood. Once I cleaned up the token permissions and wired up the Bolt app properly, testing the calculator command actually returned a correct result instead of timing out.After getting the code working locally, it was time to put it on the web. I decided to host it on my Hack Club Nest server. Logging into the Linux box via SSH felt like old school programming.Setting up the environment on the server took a few steps. I installed Node, cloned my github repository, manually created the environment file with all my private tokens, and tested it manually. Everything booted up on port 3000 just like it did on my local machine.To make sure the bot stays alive after I close the terminal, I configured a systemd service file. Now it runs as a background service with automatic restarts. Friday Bot is officially live and online around the clock.

0
8

Comments 0

No comments yet. Be the first!