raksoras / luaw Goto Github PK
View Code? Open in Web Editor NEWEvent driven, non-blocking app server for Lua
License: MIT License
Event driven, non-blocking app server for Lua
License: MIT License
Hi, I was unable to locate documentation about how to parse data received via POST method. I need to pass a file and some text inputs to a Luaw application, but I don't know if there is a standard way in Luaw to parse the received body into a Lua table.
Thanks
Even using the Luaw sample, I'm receiving the following errors at console few seconds after any HTTP request:
Error: ./bin/luaw_http.lua:343: operation canceled stack traceback:
./bin/luaw_webapp.lua:297: in function 'fn'
./bin/luaw_scheduler.lua:76: in function <./bin/luaw_scheduler.lua:73>
Error: ./bin/luaw_http.lua:343: operation canceled stack traceback:
./bin/luaw_webapp.lua:297: in function 'fn'
./bin/luaw_scheduler.lua:76: in function <./bin/luaw_scheduler.lua:73>
Not sure if it is important or I can ignore them completely.
Thanks.
Hi, I'm trying to implement a non-blocking function for a computational intense process, but it is failing and being stuck with not apparent reason.
I have written a very basic handler which suffers the same problem:
GET 'loop' {
function(req, resp, pathParams)
local scheduler = Luaw.scheduler
local thread = scheduler.startUserThread(function()
for i=1,1000 do print(i) coroutine.yield() end
end)
return "Loop"
end
}
The output of the HTTP GET in the terminal window is the following:
starting server on port 7001 ...
1
Error: ./bin/luaw_webapp.lua:355: ./bin/luaw_webapp.lua:187: No action found for path /favicon.ico for method GET
2
3 <--- FROZEN HERE
And it is frozen in the indicated line. The unique way to continue the loop is to do another HTTP GET over a different or the same path...
Am I misunderstanding something about threads in Luaw? I don't see the reason why the thread is stucked there :(
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.