Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

react check if localhost

if (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1" || window.location.hostname === "") {
    alert("It's a local server!");
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #react #check #localhost
ADD COMMENT
Topic
Name
3+4 =