Below is the code I am currently running at the bottom of my init.lua. The code above this just does the standard stuff to setup an AP and join my Wifi Network.
My question is how I code the web site to have a button which calls a function which then toggles a GPIO High and then Low after a certain timeout. Also on the ESP8266-EVB Board which GPIO do I need to trigger to open the relay?
srv=net.createServer(net.TCP)
srv:listen(80,function(conn)
conn:on("receive",function(conn,payload) print(payload)
conn:send("HTTP/1.1 200 OK\n\n")
conn:send("<html><body>")
conn:send("<h1>Roy Garage</h1><BR>")
conn:send("</html></body>")
conn:on("sent",function(conn) conn:close() end)
end)