Virtual Env for nodejs application

768 Views Asked by At

We are running a nodejs application, but we want to run different version of same application, how we can achieve this, like python virtual environment.

I have seen nodeenv, but from the examples, it seems it only provides different versions of node binary to run, but not nodejs application.

With regards,

-M-

1

There are 1 best solutions below

2
On

When you have different versions of the same app, I assume that you will have a different package.json file for each version of the app? And you probably have the different version of the app resides on different folder? Are you in a Linux environment or windows or Mac?

Can you use a .sh/bat to invoke the npm start on different folders ?