4 ms·
For anyone looking for a HTTP server, or a Lua runtime with batteries included, have a look at the Mako Server[1]. It's really wonderful to work with. I've aut
by brabel 3y ago
For anyone looking for a HTTP server, or a Lua runtime with batteries included, have a look at the Mako Server[1]. It's really wonderful to work with.
I've automated my house based on it. It includes everything you may need , from JSON to TLS, email to websockets... all in a tiny 3MB binary, including the Lua interpreter!!
I run it on a Raspberry Pi and the process takes around 3MB of RAM. Just unbelievable comparing to anything like Node.JS or Java which would require a few 100's MB.
[1] https://makoserver.net https://makoserver.net
- tetris11 3y agoDo you have a template of your configuration you could share somewhere?
- brabel 3y agoYou don't really need a template, I would say. See the tutorials for what it looks like writing a server: https://makoserver.net/tutorials/ https://makoserver.net/tutorials/ Start with this: https://makoserver.net/articles/HTML-Forms-and-LSP-for-Beginners https://makoserver.net/articles/HTML-Forms-and-LSP-for-Begin... The docs you should read are mostly from the Barracuda Application server, which Mako is built on: https://realtimelogic.com/ba/doc/?url=lua.html https://realtimelogic.com/ba/doc/?url=lua.html You can even try this online: https://tutorial.realtimelogic.com/Lua-Types.lsp https://tutorial.realtimelogic.com/Lua-Types.lsp Click on "Okay, Got it" big button and you can follow along the tutorials, edit code on a demo server, which is how I actually developed my stuff... I actually used a mix of the online editor and editing the Lua files via SSH in emacs, via TRAMP. I highly recommmend either approach.
- rcarmo 3y agoThis is pretty amazing. I have a lot of Lua resources over at https://taoofmac.com/space/dev/lua https://taoofmac.com/space/dev/lua, adding it there.
- brabel 3y agoI think you accidentally added it to a new category, "Runtimes", instead of using the existing "Runtime" which had several entries? EDIT: the Lua Lanes link is broken... the new location seems to be this: https://lualanes.github.io/lanes/ https://lualanes.github.io/lanes/
- rcarmo 3y agoThanks, will fix both.