How to compile and use the Lua powered Mako Server
The Mako Server provides a compact and efficient Lua web framework and non-blocking asynchronous sockets in a tiny ready to run application server package. The Mako Server is a good fit for embedded Linux systems such as the Raspberry Pi. Lua is a powerful and fast programming language that is easy to learn and use.
You can now just run the makefile as follows:
git clone https://github.com/RealTimeLogic/BAS.git; cd BAS
make -f mako.mk
However, let's add a few modules. Lua and the Mako Server can easily be extended and the makefile is set up for compiling two additional common modules: the SQLite database engine and Google's Protocol Buffers. When added, you have access to additional APIs from Lua.
Note: you may want to check that you are downloading the latest SQLite version: https://www.sqlite.org/download.html
cd src; git clone https://github.com/starwing/lua-protobuf.git
Now, navigate to the BAS/ directory and run make.
You can now run the Mako Server
cd ../../; make -f mako.mk
The server typically opens port 9357 (when started as non root) so you can now navigate to http://localhost:9357
You should see the built in intro page.
Now stop the server (CTRL-C) and download the tutorials as follows:
git clone https://github.com/RealTimeLogic/LSP-Examples.git
The example repo includes many examples so let's just try one of the examples, the web shell example:
You should see a Linux web based shell (web based SSH) if you navigate to http://localhost:9357
This was a quick introduction. For more, use the following tutorials and documentation:
Online Lua REPL: https://tutorial.realtimelogic.com/Lua-Types.lsp Tutorials: https://makoserver.net/tutorials/
Online documentation: https://realtimelogic.com/ba/doc/
BAS can also be compiled for deep embedded RTOS systems such as the ESP32 microcontroller. Here are two additional tutorials you may find interesting if you work with RTOS powered devices:
ESP32 tutorial: https://realtimelogic.com/downloads/bas/ESP32/ NXP's RT1020 tutorial: https://realtimelogic.com/downloads/bas/rt1020/
This topic does not have any threads posted yet!
You cannot post until you login.