For complete source code, visit the link below:
http://www.notespoint.com/nodemcu_mpy...
Build a webserver to accept user input and do something about it.
Watch how to flash micro python on to NodeMCU board here: • Flashing micropython on nodemcu esp8266