DEV Community

Cover image for πŸ€¦β€β™‚οΈ Weekly fail (41/2020)
Ryan Overton for Kontent.ai

Posted on

πŸ€¦β€β™‚οΈ Weekly fail (41/2020)

Last week, I spent the better part of my Friday livestream working on solving a single problem. With a little more attention to detail, this wouldn't have been a problem at all.

I had just gotten done implementing a custom 404 handler for a static site I have been developing for a friend. I went to test the handler, but it wasn't working. I was still getting the generic 404 exception, cannot GET \page, when a page does not exist. I spent the next 1.5 - 2 hours trying to solve why the redirect wasn't working and just before I ended my stream, I figured it out.

I had been working on this site many times over the course of several weeks and I typically leave my working pages open in a browser window, including the site running on localhost, specifically localhost:8080. I also leave my command windows open because that's where the static site generator CLI is running and watches for changes in order to rebuild and reload the site.

At some point, the command window, or CLI, crashed and when it did it left a Node.js process running in the background. This process was still running and using localhost:8080 to serve up my site. On Friday, when I reran the CLI in a command window, it started up another Node.js process, this time serving it up on localhost:8081. πŸ€¦β€β™‚οΈ And did I mention, the CLI tells you specifically where it is serving your site.

Access URLs from BrowserSync

Lesson learned: Pay attention to what the CLI is outputting and when in doubt, restart everything, including your computer.

I love the opportunity to post my fails in hopes of saving someone from the same fate, but also to show no matter how many years of experience you have, we all still struggle, and fail, from time to time. So don't get all down on yourself when it happens to you πŸ˜‰.

What was one of your fails last week?

Also, if you ever want to chat about it, or anything for that matter, drop in to my stream where you'll find an amazing, supportive group ready to welcome you and share their wins and fails!

Top comments (0)