Inspiration
Part funny prank, part useful tool. I ran across the http.cat website and I wanted something that would easily show you http codes in a fun, clever way within our Slack team.
What it does
Monitors Slack messages for anything that looks like and HTTP status code. It then replies with the image URL from the http.cat website which will be inlined by Slack.
How I built it
It was originally built using Spark as a microservice running on Heroku (easily extensible to any other similar platform). I adapted it to run on AWS Lambda, which was a very simple exercise.
Challenges I ran into
Being a very simple service, there were not too many challenges. Adding the AWS API Endpoint was a little tricky, but I figured that out by following the examples.
There were some challenges writing the parser as it had to handle things like numbers over 1000 with commas (e.g., " I raised $300,404" shouldn't get a response, while "Got an http 502, and crashed the app" should). For these things I wrote tests with JUnit to ensure the parser worked as expected.
What I learned
I learned how simple it is to build microservices. I went through the whole process of configuring a Maven build, with JUnit tests executing on every build and automated deployment when pushing to GitHub.
What's next for slackcat
It would be great to have the ability to search for an unknown code. For sample, using a slash command in Slack, you could do something like "/slackcat not found" and it would reply with "http://http.cat/404".
Log in or sign up for Devpost to join the conversation.