Localhost is the project I built to control a set of things at home.
At first time, I tried this in a local network, running the server on my computer and de ESP8266 connected to wifi router. Remember that, if I want to access the server running on my computer from my smartphone, I have to open a port on router. This is called port forwarding. You have to search for how to do it for you own router, but usually it is normally simple.
Note: If you don't do it, the smartphone will not connect to the server, the same way that the ESP8266 will also not connect. Also, remember that you should authorize the server app on your firewall. Either add an exception to accept inputs on that port or disable firewall just for test.