I'm researching about php7 and node.js to decide which one is better suited for my tasks. I read about node.js needs a server restart when a error gets thrown.
So lets say I use many libraries in my website, so a error is plausible.
I read in node.js I can store data in variables instead of in a database and use that data from the variables in the next call. Correct me if I'm wrong I never used node.js so far.
Now error gets thrown and cause of this server needs to be restarted.
Then I read there are tools that do that they restart the server eg. the tool called "forever". But now my questions -->
Does the next instance of my server can maintain the state of the old instance or does the data in the variables get lost?
Or do i have to pass this data via some tools like "forever" in the constructor or something of the next instance of the server? I guess this would be spaghetti code.
And if a error gets thrown in cause of wrong requests and there other requests still processing and the server shuts down cause of the error, will all requests time out or return something?
Thank you very much for making stuff clear for me