Answer the question
In order to leave comments, you need to log in
How to check if the server is running locally or on a VPS?
Need to check the environment where the server is running?
Will it be enough to check the type HOST !== '0.0.0.0' - so it's not a localhost ?
NODE_ENV cannot be checked, as there may be a local launch in production.
Answer the question
In order to leave comments, you need to log in
NODE_ENV cannot be checked, as there may be a local launch in production.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question