I gave myself a learning assignment - create a nice website to be hosted from a Node.js server accessible to my home network. My base system is running Windows 7 and I want to give this website a custom domain, so that accessing it from other devices is easy.
I have edited my host file to add
127.0.0.1 - now
http://mydomain:8080 works on the same machine, but different devices can’t access it (equivalent to
localhost, which makes sense that other devices can’t use it). Now I am thinking that I might need a way to make my network ip address static, then map that IP to “mydomain” in the host file.
Ideally I would prefer not to have to type the port either and just use something like
os.networkinterfaces() available to it - which you are able to iterate through and return the network IP. Maybe I just need a way to map the network IP to a custom domain?