The DNS is obtained from nodemcu/nodemcu-firmware#59 and improved. It allows all requests to direct to 192.168.4.1.
All the code together forms a captive portal that loads a page to control an RGB LED.
Make sure to upload the html pages and the lua files. In my current setup wifi_hotspot.lua, dns.lua and led.lua are compiled to lc files.