
Ask HN: How do you switch environments between projects - tigroferoce
I usually work on multiple projects in parallel (e.g. current customer, bugfixing on old project, side projects), and switching between projects is a pain because nowadays they require multiple resources (db, multiple microservices, frontend, kafka, ...).<p>My workflow usually starts from the shell; I&#x27;m on MacOS and I use iTerm2 and Visual Studio Code, usually, so the workflow typically is:<p>- open a bunch of tabs<p>- go to the root of each subproject (e.g. backend, frontend)<p>- run docker in background if necessary (i.e. for the DB)<p>- run &#x27;code .&#x2F;&#x27; to open the editor<p>- run the application (e.g. &#x27;npm start&#x27;)<p>- open the browser at the right location<p>- develop<p>The workflow is tedious and if I need to switch between projects it has a significant overhead, so I was thinking about scripting it. Since everything starts from the shell I was thinking about using ttab (https:&#x2F;&#x2F;github.com&#x2F;mklement0&#x2F;ttab) and add a small script to run everything, but I wonder if there is a better approach.
It would be great if there was a way of freezing the state of a number of application and resume them at some point (like I would do if everything was inside a virtual machine, just without the overhead).
======
fpalmans
Have you considered running several vnc(or similar)servers on separate
machine/machines and connecting to those?

~~~
tigroferoce
I want to keep my setup as lean as possible. I hoped I could find a way to
suspend and resume groups of application, but apparently on OSX it is not
possible.

So far I have a hack that starts a number of terminals from which the various
applications necessary are started.

