Skip to content

leafo/lapis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Nov 1, 2024
a13caec · Nov 1, 2024
May 10, 2022
Jan 25, 2023
Jan 9, 2023
Oct 8, 2024
Nov 1, 2024
Nov 1, 2024
Apr 25, 2020
Feb 12, 2023
Feb 12, 2023
Feb 12, 2023
Sep 23, 2019
Jul 20, 2023
Apr 18, 2023
Jun 22, 2023
Apr 18, 2023
Jan 25, 2023
Jul 20, 2014
Jul 20, 2014
May 8, 2023
Sep 9, 2012
Oct 21, 2016
Oct 15, 2016
Nov 2, 2023

Repository files navigation

Lapis

A web framework for Lua/MoonScript supporting OpenResty or http.server

spec

Lapis is production ready, use it on your next huge project.

Learn more on the homepage: http://leafo.net/lapis/

Join Our Community

We just created a Discord for Lapis users and those interested in it to communicate. You can join us here: https://discord.gg/Y75ZXrD

Lapis Powered

Made a website in Lapis? Tell us

Supplemental Libraries

  • lapis-eswidget - A widget base class designed for organizing front-end code bundling
  • lapis-annotate - Autogenerate comments on models with their database schema
  • lapis-console - Interactive MoonScript console for Lapis that runs inside of your browser
  • lapis-exceptions - Exception tracking and reporting
  • lapis-bayes - General purpose Bayes classification for Spam, Fraud, etc.

Running Tests

If you need to run tests outside of our CI. The test suites require Busted and MoonScript. There are three separate test suites:

  • busted -- test Lua implementations
  • busted spec_postgres -- integration tests with PostgreSQL. Requires a running PostgreSQL server
  • busted spec_mysql -- integration tests with MySQL. Requires a running MySQL server
  • busted spec_openresty/ -- integration tests with OpenResty as a server. Requires installation of OpenResty & Databases
  • busted spec_cqueues/ -- integration tests with lua-http and cqueues as a server.

Test suites that require databases need to have the initial database created. A lapis_test database is created on each. You can run each command respectively.

make test_db # postgres test db
make mysql_test_db
  • PostgreSQL: Ensure the postgres user can be logged in with no password.
  • MySQL: Ensure the root user can be logged in with no password.

Using the Docker image

This repository contains a Dockerfile for running the entire test suite. You can run it with the following commands:

docker build -t lapis-test .
docker run lapis-test

docker build will pull in the files in the current directory, including any changes. To test modified code, build again before running the test suite. It should be a quick operation since dependency installation is cached.