If by 'Esp unit' you mean Espruino WiFi or Pico then you can use HTTPS/secure websockets, which will be a bit more secure when you're sending data over the internet.
Otherwise if you're just talking about bare ESP8266 you're stuck with standard HTTP, in which case some could conceivably spy on the commands that you send.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Yes, absolutely. There's a bit of information on doing that here: http://www.espruino.com/ws
If by 'Esp unit' you mean Espruino WiFi or Pico then you can use HTTPS/secure websockets, which will be a bit more secure when you're sending data over the internet.
Otherwise if you're just talking about bare ESP8266 you're stuck with standard HTTP, in which case some could conceivably spy on the commands that you send.