Web Development with the Barracuda App Server

The Barracuda App Server (BAS) is a general-purpose application platform for embedded systems, where Lua is used for both business logic and protocol integration (e.g., OPC UA, Modbus, and MQTT). This section focuses specifically on BAS as a web application platform.

When developing web applications with BAS, it is important to understand two core concepts: the Virtual File System (VFS) and authentication. These form the foundation for how applications are structured, secured, and executed.

If you are using Mako Server or Xedge, you can defer a deep dive into the VFS. These reference platforms handle much of the underlying setup, allowing you to get started quickly with building applications.

Similarly, authentication can be postponed if you are working with the Ready-to-Run Embedded Web Interface Template, as it includes a preconfigured authentication mechanism.

For a faster development path, Mako Server and Xedge users can jump directly to Lua Server Pages (LSP), which also provides a list of recommended tutorials and the Embedded Web Interface Template, enabling you to start building functional web applications immediately.

C/C++ Developers

With BAS, server-side applications, including REST and RPC services, can be implemented in C or C++. However, unlike when using Mako Server or Xedge, routing is not configured automatically via the Virtual File System (VFS). In C/C++, you are responsible for explicitly defining request handling and resource mapping using the BAS C APIs.

We recommend starting with the VFS and authentication concepts. While the documentation is presented from a Lua perspective, the same architecture applies, but you implement it directly using the C interfaces.

As a practical next step, read the C/C++ introduction and use one of the provided C examples as a baseline for structuring your application.

For HTML generation, you can optionally use CSP (C Server Pages), the C/C++ equivalent of Lua Server Pages (LSP), though many C-based applications instead favor pure REST or RPC-driven designs.