Post your best Lua script examples here

User avatar
By forlotto
#30852 Dunno if this will help but, if you are running locally and not remotely you could:

Set the IP of your NodeMCU as static.

Then Insert that ip into your hosts file and whatever domain you wish to resolve.

For an android device you will need root access unless they make some program that will do it without root which I am currently unaware of but there may be a browser plugin which will allow the hijack of dns for local connections.

This would be the only downfall I see if doing it locally and not needing control remotely.

this way if you wanted you could make your device resolve as whatever you want without needing to pay for a domain if you wanted to be funny and you did not like google.com we will say just for instance you could even make it resolve as google.com.

Well maybe this helped maybe not...

You will not however be allowed to resolve your local ip as anything other than your WAN IP which will be then pointed to a domain using NOIP or something similar which would need appropriate settings to be enforced in your router. There is some work being done for dynamic dns for the nodemcu for remote access if that is what you need and if I come across it again I will gladly point you to it for some odd reason I currently cannot find it.