Luvit speaks the language of Node - so you're productive from day one, but with the blazing speed of LuaJIT under the hood.
Callbacks? Coroutines? Event emitters? Yes. Luvit doesn't force a pattern - it embraces your flow.
luv directly in LuaJITlit without Node APIsFrom complex financial simulations to cloud systems, Luvit is the silent force behind real, production-grade software.
From entire cloud systems to mathematically complex financial simulations - Luvit has proven to scale fast, perform hard, and never breaks a sweat. Thank you, LuaJIT!
The luvit CLI tool can be used as a scripting platform just like
node...
This simple web server responds with Hello World
, and you can run it
with luvit server.lua:
No need for Apache or Nginx - it that good, it just works.
local http = require("http")
http.createServer(function(req, res)
local body = "Hello world\n"
res:setHeader("Content-Type", "text/plain")
res:setHeader("Content-Length", #body)
res:finish(body)
end):listen(8080, "127.0.0.1")
print("Server running at http://127.0.0.1:8080/")
> luvit server.lua
Server running at http://127.0.0.1:8080/
local weblit = require("weblit")
weblit.app.bind({ host = "127.0.0.1", port = 1337 })
-- Configure weblit server
.use(weblit.logger)
.use(weblit.autoHeaders)
-- A custom route that sends back method and part of url.
.route({ path = "/:name" }, function(req, res)
res.body = req.method .. " - " .. req.params.name .. "\n"
res.code = 200
res.headers["content-type"] = "text/plain"
end)
-- Start the server
.start()
Say goodbye to complicated build pipelines. Luvit's lit package
system makes dependency management painless and scriptable.
For example, @creationix created coroutine-based libraries like
weblit.
Install with lit install creationix/weblit and serve with
luvit.
> mkdir myapp && cd myapp
> lit install creationix/weblit
> nano server.lua
> luvit server.lua
Luvit is licensed under the Apache 2.0 License to The Luvit Authors
. This
ensures
accessibility for users and contributors alike.
This is an independent fan-made redesign of the Luvit website, created to highlight the brilliance of the Luvit ecosystem.
Designed by Numelon Bespoke as a demonstration. Kavun Cloud and nearly every Numelon service uses Luvit under the hood. It's that good.