Over the past seven months, I have been fighting a battle with ReactJS. There were highs and there were lows. I even went AWOL for a month. Nevertheless, today is when I deploy my development copy online for the world to see. All the hard work and tears on display for prying eyes.....or it would have been the case if I could get it to work.
So, here I am. Once again. So this began because I wanted to use a cheap (free) hosting option. I decided on Heroku because I was already using version control on GitHub, so deployment would be a breeze. Then.....Heroku gave me a memory error. What! Is this, the pains of being on a free plan? The error says memory leak, but I don't want to spend the rest of the week figuring that out. Let's try Azure......nope. I have a strong feeling that both being NodeJS 16, and I being on Node 17 is the issue. That just might be the issue. Well then how am I going to get my build onto the internet using my current setup.......
As the title of this article says, Docker saved the day. What's funny is that I installed Docker before I started my ReactJS App. The plan was to house the app in the container, but that got lost somewhere in the rush to learn ReactJS. Docker faded into oblivion. That is, until today. I built a Dockerfile. Added it to my app's folder and ran the build command and got my app image. It did take me a minute or two to see there was a difference between the container and the image, or that you could run multiple containers of that image at the same time.
I can see why Docker is dominating software development. After a few moments of uncertainty and my app was working. Hooray!