Node.js for lua?

前端 未结 9 879
走了就别回头了
走了就别回头了 2021-01-30 14:11

I\'ve been playing around with node.js (nodejs) for the past few day and it is fantastic. As far as I can tell, lua doesn\'t have a similar integration of libev and libio which

9条回答
  •  隐瞒了意图╮
    2021-01-30 14:20

    A recent corresponding project is Luvit "(Lua + libUV + jIT = pure awesomesauce)".

    From the announcement:

    this is basically luajit2 + libuv (the event loop library behind nodejs). It compiles as a single executable just like nodejs and can run .lua files. What makes it different from the stock luajit distribution is it has several built-in modules added and some slightly different semantics.

    Notice that we're not running as a CGI script to apache or anything like that. The lua script is the http server. You get your callback called every time an http request is made to the server.

提交回复
热议问题