Skip to content

Latest commit

 

History

History
executable file
·
39 lines (26 loc) · 875 Bytes

README.md

File metadata and controls

executable file
·
39 lines (26 loc) · 875 Bytes

Lua bindings to labstack's echo library

Gopher-lua bindings to labstack's echo library.

Notes

These bindings don't support echo's routing or middlerware functionallity. You have to register your routes and middlewares from inside go. This library is intended to provide the ability to run custom Lua scripts on top of echo.

Example

    import (
        gecho "github.com/epikur-io/glua-echo"
    )

    e := echo.New()

    // Echo setup. Bind routes and middlerwares...

    e.GET("/", func(c echo.Context) error {
        L := lua.NewState()
        L.PreloadModule("echo", gecho.Loader)
        L.DoString(`
            local echo = require("echo")
        `)

        // !TODO: Add example. Show how to bind echo's context to lua

        return
    })
    -- !TODO