In the first request, error get occurred and then server won't process any more requests.
Using forever we can automatically restart NodeJS server. First install forever like below.
Now, run above code using following command.
In the first client request server will crash. But forever will restart the server again. Forever is not a better way to handle errors in NodeJS application. But this is useful as a back for the unexpected.
Using forever we can automatically restart NodeJS server. First install forever like below.
Now, run above code using following command.
In the first client request server will crash. But forever will restart the server again. Forever is not a better way to handle errors in NodeJS application. But this is useful as a back for the unexpected.