I realize this question is a bit subjective, but I still decided to ask it as any piece of advice will be helpful (suggestions in comments are perfectly fine).
I have a nodejs server (1) that acts as reverse-proxy. As part of starting up this reverse-proxy server (1), I want it to child_process.spawn()
another nodejs webserver (2) that I will be proxying to. This another webserver (2) is basically a rendering framework (nextjs).
I've googled around and haven't found an article describing the setup like this. What are potential pitfalls of such setup I should be aware of? My idea is that when it comes to stdout and stderr this server (2) will be running similar to starting it from command line or pm2.