Use postgres 15 and remove pllua
Add funding file
Create version 0.2.4
Lua web framework based on lua-http and PostgreSQL.
Tulip is a minimal and simple web framework (a framework for web systems, really) that provides a lot with very little. Using only Lua (currently 5.4) and the PostgreSQL database (currently 13), the framework packs the following features:
The Small is Beautiful (The Developer's Edition) blog post provides some background and context about the vision and goals of this project.
Clone the project and install the required dependencies:
Then you should be able to prepare the environment and install the Lua dependencies by running the init script:
$ ./scripts/init.lua
To run tests and benchmarks (be sure to check the configuration section below):
$ llrocks run test/main.lua
# if there are benchmarks available:
$ llrocks run bench/*.lua
To view code coverage:
$ llrocks cover test/main.lua
Note that because some tests (e.g. the csrf middleware) run the server in a separate process and only the client requests are made from the actual LuaUnit-executed process, test coverage reports lower numbers than what is actually covered.
While the scripts/init.lua
script sets up most of the required configuration, some
environment variables and secrets cannot be set automatically. Here's what the .envrc
file managed by direnv
should contain:
PGPASSFILE
: init-generatedPGHOST
: init-generatedPGPORT
: init-generatedPGCONNECT_TIMEOUT
: init-generatedPGUSER
: init-generatedPGDATABASE
: init-generatedTULIP_CSRFKEY
: init-generatedTULIP_ACCOUNTKEY
: init-generatedTULIP_SENDGRIDKEY
: set to a valid Sendgrid API keyTULIP_TEST_FROMEMAIL
: set to a valid email address for testsTULIP_TEST_TOEMAIL
: set to a valid email address for testsThe BSD 3-clause license.