“Person holding a plastic coffee cup in front of colorful wall at Venice Beach” by Marion Michele on Unsplash

Whenever I choose a new cloud-hosting plan in order to have a remote server for my developments, I’m often to run multiple apps on it.

There are many reasons to this, for instance:

It allows me to keep my computer clean from the garbage that comes with downloading and installing tons of IDEs, libraries, packages, etc.

from the garbage that comes with downloading and installing tons of IDEs, libraries, packages, etc. It allows me to have a server running 24/7 so that my customers can follow my progression whenever they want.

so that my whenever they want. It removes the hassle of configuring my box to allow public visitors on my projects.

on my projects. Basically a physical server is a computer just like any other, so why would I host only 1 app per server ?

Now comes the implementation part, and if you’ve tried yourself at this exercise you know that it often ends like this :

Multiple projects, each one is running on a specific port

What has to be noticed here is that once you’re running a project, it listens on a specific port and you have to keep a list of which ports are used if you don’t want to stumble across a fatal error :

EADDRINUSE: This port is already in use

The other pain point is that when you’re interacting with your program, your requests will look something like this :

http(s)://domain.ext:port/route