This is a simple method to control an LED connected to NodeMCU from a Mobile device through an app or from the web browser of your mobile device.
After installing the library, open the example program from File -> Examples -> LEDcontrol -> LEDcontrol and upload to your NodeMCU. If uploading successful, connect your mobile device to NodeMCU through WiFi. Now, open 192.168.4.1 on a web browser. You will get a web page as shown below. GREEN button will turn ON the LED and RED button will turn OFF the LED. Third image is from the mobile app of LED control system. App install link will be provided soon.