Am I able to run firebase emulators with "forever" module?

90 views Asked by At

I am running a nodejs server locally with Firebase emulators (using firebase emulators:start). I have another version running on google cloud functions - but I also need something running locally.

When errors happen, my whole node process dies, and the emulator dies etc... and I have to go back and restart the process manually. Is there a way to automatically restart it when an error happens, such as using forever? I tried with something like forever start firebase emulators:start but that didn't work.

1

There are 1 answers

0
CasualCoder On BEST ANSWER

Due to how Firebase is built and operates, it does not support any such functionality of staying awake as a process virtually non-stop. You would most likely need to refactor your code in such a way that the process you need to keep alive indefinitely is separated from your code hosted by the firebase emulator.