Skip to content

zeykatecool/Luon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Luon Network Package for LuaRT

  • Luon is a network package for LuaRT.
  • Making TCP and HTTP usage easier.
  • Adding support for Websocket.

Installation

  • You can download the files and require it from your main script.

Usage Example

  • Check docs to see how to use Luon.
  • Usage example for adding and clearing cookies.
require("luon.luon")
local App = Luon.Server("127.0.0.1", 5000)

App:Use(function(req, res, next)
    print("[REQ]", req.Method, req.Path)
    next()
end)

App:Get("/set", function(req, res)
    res:SetCookie("foo", "bar", { path = "/" })
    res:send("Cookie set", "text/plain")
end)

App:Get("/clear", function(req, res)
    res:ClearCookie("foo")
    res:send("Cookie cleared", "text/plain")
end)


App:Listen()

License

Help

About

TCP and HTTP module for LuaRT.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages