Fullmoon – Redbean-based Lua web framework deployed as single file
github.com
github.com
This looks like it could mesh very well with Node Red, or really any Lua scripted environment. Thanks!
to run the demo, still I got lots of warning about "tool/net/redbean.c:1034:redbean:68740] (lua) failed to run lua code: /.init.lua:1: module 'fullmoon' not found", adding the path to LUA_PATH and LUA_CPATH did not help.
last, is there a lua version requirement for this? My system default to lua 5.1.
I was thinking about using this for an embedded board, but the code is actually quite large, 1.6M after zipped, which is too much for small boards.
Redbean can't use the system Lua, so it comes bundled with its own Lua interpreter (Lua 5.4; there is also work being done to allow LuaJIT or Luau to be embedded instead).
The modules need to be put in the .lua directory within redbean archive; redbean searches within its archive, so you don't need to set LUA_PATH/LUA_CPATH. I have instructions on how to get examples working included in the examples (https://github.com/pkulchenko/fullmoon/tree/more-links#examp...) section.
In terms of the size, this includes MbedTLS and SQLite, so if you don't need those modules, you can compile redbean without them, which should reduce the size considerably.
[1] https://github.com/Olivine-Labs/lua-style-guide#variables
> Highly experimental with everything being subject to change.
Makes me a little hesitant to give the tires a serious kick, though.
lua is a lovely scripting language, i was looking at replacing my bash scripts the other day in my project, lua could be a solid candidate..
Apart from using Redbean (which looks interesting itself), could you summarize the differences between Fullmoon and Lapis?
In terms of the differences, Lapis is definitely the more feature rich one, as it includes its own ORM and integration with various back-ends (including data access and migration). Lapis is largely class-based and Fullmoon is taking a more procedural approach, which I think aligns better with redbean's simplicity and performance. Lapis provides session support, which Fullmoon currently doesn't have, but it's one of the next functions I plan to implement. Routing and templating capabilities are similar in both, even though the approaches taken are quite different.
Fullmoon is likely to be noticeably faster (at least based on my local tests) and can leverage some of the components already available in redbean out of the box (for example, argon2, hmac functions, and direct SSL integration). Lapis is well documented and has several interesting projects built on it, so it's much more battle tested. fullmoon is only 3 months old and is being actively worked on. Its code is also much shorter, so it may be easier to study and tweak. Fullmoon also includes 150+ tests that one can run locally or from redbean.
Hope this helps as a quick overview, but if there are more detailed questions, let me know.