- essayé d'installer webide sur NodeMCU, il y a justement un exemple de websocker server, je n'arrive pas encore à comprendre comment cela marche - donc il y a encore pas mal de taf
13 lines
315 B
Lua
Executable File
13 lines
315 B
Lua
Executable File
return function (connection, req, args)
|
|
dofile('httpserver-header.lc')(connection, 200, 'html')
|
|
|
|
if req.method == 'POST' then
|
|
local rd = req.getRequestData()
|
|
if (rd['data'] ~= nil) then
|
|
print("data: ",rd['data'])
|
|
ws2812.write(rd['data'])
|
|
end
|
|
end
|
|
collectgarbage()
|
|
end
|