Archive

Archive for June, 2022

React – Proxy error: Could not proxy request

June 18, 2022 Leave a comment

Problem:
I was getting the following error
“Proxy error: Could not proxy request See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNREFUSED).”

Solution:
Change in package.json

"proxy": "http://localhost:5000"

To

"proxy": "http://127.0.0.1:5000"

No idea why this works. When I do a curl on localhost:5000 I get back a response. SMH. This was working previously with node version 16, but not anymore with node version 18.

Source:
https://stackoverflow.com/questions/45367298/could-not-proxy-request-pusher-auth-from-localhost3000-to-http-localhost500

Categories: javascript Tags: , ,

Learning Containers From The Bottom Up

June 7, 2022 Leave a comment

When I started using containers back in 2015, my initial understanding was that they were just lightweight virtual machines with a subsecond startup time. With such a rough idea in my head, it was easy to follow tutorials from the Internet on how to put a Python or a Node.js application into a container. But pretty quickly, I realized that thinking of containers as of VMs is a risky oversimplification that doesn’t allow me to judge:

  • What’s doable with containers and what’s not
  • What’s an idiomatic use of containers and what’s not
  • What’s safe to run in containers and what’s not.

Since the “container is a VM” abstraction turned out to be quite leaky, I had to start looking into the technology’s internals to understand what containers really are, and Docker was the most obvious starting point. But Docker is a behemoth doing a wide variety of things, and the apparent simplicity of docker run nginx can be deceptive. There was plenty of materials on Docker, but most of them were:

  • Either shallow introductory tutorials
  • Or hard reads indigestible for a newbie.

So, it took me a while to pave my way through the containerverse.

This article is not an attempt to explain containers in one go. Instead, it’s a front-page for my multi-year study of the domain. It outlines the said learning path and then walks you through it, pointing to more in-depth write-ups on this same blog.

Mastering containers is no simple task, so take your time, and don’t skip the hands-on parts!

https://iximiuz.com/en/posts/container-learning-path/

Categories: Interesting Tags: