Lapis is a web framework for Lua and MoonScript that runs on OpenResty or lua-http.
Lapis addresses the need for a web framework in the Lua ecosystem by providing a complete toolkit for building web applications. It leverages OpenResty, which embeds Lua in Nginx, or alternatively supports the lua-http server. The framework is written in MoonScript, a language that compiles to Lua and offers a more concise syntax, though applications can also be written directly in Lua.
Lapis suits developers building web applications where Lua's lightweight nature and OpenResty's performance characteristics are advantageous. It is particularly well-suited for projects that benefit from running within Nginx or that require the efficiency of Lua-based request handling. The framework includes built-in support for database integration with PostgreSQL and MySQL, making it practical for data-driven applications. Developers should be aware that adopting Lapis means committing to the Lua ecosystem and either learning MoonScript or writing Lua directly.
The project maintains a comprehensive test suite covering Lua implementations, PostgreSQL integration, MySQL integration, OpenResty server integration, and lua-http with cqueues. Testing infrastructure includes both traditional test commands and Docker-based test execution to ensure consistency across environments. The framework is documented with a getting started tutorial, full reference documentation, and a changelog. The project has established a community Discord channel for user communication and maintains a list of production websites built with Lapis, including notable services in the gaming and music education spaces.