-->
Page 2 of 5

Re: Another web server

PostPosted: Mon Jan 05, 2015 9:18 am
by bradvoy
Interesting. I'm not seeing that problem when uploading via ESPlorer v0.1 build 205. That line is valid LUA syntax, so I think it must be a problem with LuaLoader.

You can change that line to "x = request.query.x", which is equivalent.

Re: Another web server

PostPosted: Mon Jan 05, 2015 11:02 am
by picstart
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > stdin:1: ')' expected near ']'
> > > > > > > > > > > > > > > > > > > > > > = node.heap()

same error with the uploader esp8266 lualoader 0.70 after commenting out x = request.query["x"]
removing the line x = request.query["x"] allows the uploader to upload and the code works using the equivalent x = request.query.x

This a good evidence of an issue with the uploader esp8266 lualoader 0.70
See below
pages = {}
pages["/test"] = function(request)
return "<html><head><title>Web Test</title></head><body><h1>Web Test</h1><body>Request received: " .. request.method .. " " .. request.url .. "</body></html>"
end
pages["/test2"] = function(request)
x = request.query.x
--x = request.query["x"]
x2 = x * x
return "<html><head><title>Square</title></head><body><p>" .. x .. " squared is " .. x2 .. ".</p></body></html>"
end

Re: Another web server

PostPosted: Mon Jan 05, 2015 6:55 pm
by Mike
Great work !

After resolving some struggles with the upload this was the first httpserver which left enogh resources to write some Extensions (Beep, usw PWM etc.) without crashing the nodeLua !

Thanks for sharing!!!

Re: Another web server

PostPosted: Wed Jan 07, 2015 1:42 am
by jankop
I ran into a problem with the length of the HTML page during testing, . With a longer page server did not work. But with the new Lua (build 20150106) already it works perfectly. It's just a detriment that is not integrated parser for POST request too.