Cookie Consent by Free Privacy Policy Generator 📌 Hosting old Node Projects 👴🏼


✅ Hosting old Node Projects 👴🏼


💡 Newskategorie: Programmierung
🔗 Quelle: dev.to

A while ago, a friend of mine asked me to help him extend an old NodeJS project. But when we finished with all the changes, we could not deploy it anymore! The Node version was simply too old.

Google App Engine (GAE), where it was hosted before, refused to take care of our oldtimer. Yeah, they had a point. Hosting old stuff is generally not recommended for security reasons. And as a company, you don't want to maintain 20 different Node versions forever.

So we were left with the choice: spend a day, trying to upgrade Node and all dependencies, or find a different way to host our project.

It's the age old question:

To upgrade or not to upgrade?

Upgrading or not upgrading is essentially risk management. It's about estimating:

  • How big is the impact of a security breach?
  • How likely is it to happen?
  • How confident are you in your estimate?

I will make a wild guess here: If you really plan to host a 5 years old Node project, it's either so much enterprise that none of us programmers can fully comprehend the logic behind that decision, or it's a tiny project.

Our project is not mission critical. It does not store any personalized data and if it's down for a day, probably 2 people will notice.

We did not upgrade.

So, finding a different hosting solution it is!

Docker to the rescue 🐳

Luckily there is a neat little tool called Docker. It opens the doors to hosting pretty much anything you wish. Be it a frontend, backend, database or 5 year old NodeJs application.

For those of you, who are not already familiar with Docker, here is my two sentence intro:

Docker creates a container around your code, that houses all the dependencies necessary to run it. You define all of what you need in a Dockerfile, that can look something like this:

FROM node:12.3.1-alpine AS builder

WORKDIR /my-app

COPY package.json package-lock.json ./

RUN npm ci

COPY . .

RUN npm run build

FROM node:12.3.1-alpine AS runner

WORKDIR /my-app

COPY --from=builder /my-app/.output ./.output

EXPOSE 9000

CMD ["node", "./.output/server/index.mjs"]

This Dockerfile contains instructions to build a Docker image with Node 12 installed, then copy our code in it, build it and run it. I won't go into all of the details in this post, but I do recommend you check out some other tutorials on Docker if you have not heard about it before.

And now instead of having to ask yourself: "Which provider still accepts Node 12?"

You ask: "Where can I host my container?"

Hosting Options

1. Self Hosting

If you know a thing or two about self hosting, you are probably able to fairly quickly spin up a VPS and throw your container on there.

But if you know a thing or two about self hosting, you also know, that taking care of the server can cause a lot of headaches and even if you manage to spin it up quickly, there is a bunch of overhead in solving secrets management, deploys, security updates etc.

If you want to dig into it anyways, Dokku is an interesting mention. They provide an Open Source PaaS that you can install on your server to simplify self hosting containers.

For our project though, we don't want to deal with server management, we just need a solution for hosting our old little Node project.

2. Major Cloud Providers

Amazon, Google and Microsoft offer a multitude of products (ECS, Cloud Run, Azure Container Instances, ...) in the container hosting space. They equip you with the tools to withstand an army of millions of users, firing requests at your container from all over the globe.

Great! No more worries about scaling! 🥳

But wait, we didn't worry about scaling in the first place. These solutions are highly capable but also highly complex. In the time we'd spend figuring out which product is the right one for our needs, we could have done a complete rewrite of our app.

And if we ever have to deal with an army of millions of users, it's probably time to upgrade...

We need a simple solution.

3. Simple Container Hosting

There are a bunch of other cloud services, that try to make simplicity a priority. These include Digital Ocean, Render or Railway for example. While they generally offer a great service, their entry plans often come with significant restrictions.

A fair compromise, but we were not fully happy with it.
If you read the book: "The third door", you know that there is often times an option, that is not obvious at first...

What Hoster did we choose?

We went for option Nr. 4 and instead of upgrading our app in a day, we fell into the rabbit hole and spent over a year of building a container hosting platform ourselves. 🤠

With a strong focus on simplicity, Sliplane enables you to deploy unlimited containers at a fixed rate for the fraction of the price of other popular hosting options. If you want to give it a shot, you can try it for free.

Recap

  1. Only host old stuff, that can't create serious damage
  2. Use Docker to containerize your app
  3. Choose from: self hosting, major cloud providers or simple container hosting solutions

Or try Sliplane, which I co-founded.

...

✅ Hosting old Node Projects 👴🏼


📈 35.43 Punkte

✅ XZ Utils 5.6.2 (stable), 5.4.7 (old stable), 5.2.13 (old old stable) have been released


📈 23.33 Punkte

✅ These hosting companies let you resell their hosting to others


📈 20.8 Punkte

✅ Web Hosting Guide: Top 5 Features Of Cloud Hosting For Websites


📈 20.8 Punkte

✅ Top Video Hosting sites (2019) - Best video hosting for 2019


📈 20.8 Punkte

✅ What is Web Hosting - Web Hosting Explained


📈 20.8 Punkte

✅ 6,500+ sites deleted after Dark Web hosting provider Daniel’s Hosting hack


📈 20.8 Punkte

✅ UK & EU hosting: Best hosting providers with data centers in Europe


📈 20.8 Punkte

✅ Design & Hosting by Mando Hosting / SQL Injection


📈 20.8 Punkte

✅ KingNull leaks DB of Daniel’s Hosting dark web hosting provider


📈 20.8 Punkte

✅ These four major U.S. hosting companies let you resell their hosting


📈 20.8 Punkte

✅ FlokiNET Hosting - Your best choice in web hosting


📈 20.8 Punkte

✅ A Year of Self-Hosting: 6 Open-Source Projects That Surprised Me in 2023


📈 19.99 Punkte

✅ 5 Best Platforms for Hosting Your Web Development Projects


📈 19.99 Punkte

✅ Git Workflow for Machine Learning Projects: the Git Workflow I use in my Projects


📈 19.18 Punkte

✅ Could an old ideapad be a mini file hosting server?


📈 18.18 Punkte

✅ 5-Year-Old Hosting Service AllMyVideos, No Longer Profitable, To Shut Down


📈 18.18 Punkte

✅ 5-Year-Old Hosting Service AllMyVideos, No Longer Profitable, To Shut Down


📈 18.18 Punkte

✅ How to install Node on cPanel shared hosting (without root access)


📈 18.06 Punkte

✅ 15-Year-Old Unpatched Python Vulnerability Potentially Affects Over 350,000 Projects


📈 17.37 Punkte

✅ Alert: 15-year-old Python tarfile flaw lurks in 'over 350,000' code projects


📈 17.37 Punkte

✅ Unpatched 15-year old Python bug allows code execution in 350k projects


📈 17.37 Punkte

✅ Vulns & Secure Design, MiraclePtr Success, Abandoned Projects & Maven, Old "AI Chip" - ASW #271


📈 17.37 Punkte











matomo

Datei nicht gefunden!