The examples show how to assemble the Barracuda Embedded Web Server and the Barracuda App Server (BAS) into real applications. Some examples are small C or C++ server programs. Others are Lua Server Pages (LSP) systems, Xedge applications, or support code that you can reuse when porting BAS to an embedded device.
The core C examples are designed in ANSI C. The public header files also include C++ wrappers, so a C++ project can use the C++ API style while still building on the same C library.
Most C and C++ server examples share the same build structure. Start with Introduction to the Barracuda Examples if you need to understand the example directories, makefiles, generated CSP code, host builds, target builds, and the standard port used by the examples.
Many examples listen on the same host and port, typically
localhost:9357. When you stop one example and start another, the browser may reuse cached files, cookies, or session state from the previous server. If a page looks wrong, clear the browser cache/site data for the local server or use a fresh browser profile.
| CSP introduction | Best first C/C++ server example. It follows the introductory CSP material and shows how CSP pages, static files, generated C code, and the Virtual File System fit together. |
| HttpResMgr | Recommended after the CSP introduction. This example explains how an extended HttpDir object can manage resources below a Virtual File System branch and expose file-system content through the web server. |
| Hangman | A compact C version of the Hangman CSP whitepaper example. Use it when you want a small application that is easy to inspect end to end. |
| Security | Advanced C authentication and authorization example. It demonstrates users, roles, authenticators, authorizers, and protected Virtual File System branches. |
| WebDAV | Shows how to expose a directory tree as a WebDAV network drive. The example is useful when a device should be mounted from Windows, macOS, or Linux through HTTP or HTTPS. |
| UploadFirmware | Shows a browser and command-line firmware upload flow. It uses HttpUpload, asynchronous response handling, ZIP extraction, and a worker thread for post-upload installation work. |
| ServerTcpCon | Shows how an HTTP or HTTPS request can locate a service by URL and then hand the socket over to proprietary TCP protocol code. |
| WebSocket-Chat | Basic WebSocket chat server and browser client. It demonstrates text frames and binary frames by distributing dropped JPEG images to connected clients. |
| HttpsClient | Source-only HTTPS client example using HttpClient and SharkSSL. Start with HttpsClientTest1.c for certificate validation in C and HttpsClientTest2.cpp for the C++ style client and JSON parsing example. |
| LspNetIo and LspDiskIo | Embedded LSP development examples. LspNetIo is useful when the target has no local file system and fetches Lua/LSP files from a host computer. LspDiskIo is useful when the target has a file system and can be edited through WebDAV during development. |
| Xedge | Build guide for the Xedge C code. Xedge embeds a Lua application environment and web IDE in a BAS-based firmware-style server, making it suitable for RTOS and deeply embedded development. |
| Mako Server | Build guide for the standalone Mako Server. This is the full BAS-based server for operating systems such as Linux, Windows, QNX, and VxWorks, with optional Lua, SQL, TPM, ZIP, and product extension points. |
| Web File Server | Legacy Web File Server note. The standalone WFS example has been replaced by configuring the Mako Server as a Web File Server. |
| SMQ | Simple Message Queue C client library and LED demonstration program. Use this example when you need publish/subscribe IoT or M2M connectivity from an embedded device. |
| HTTPS client in C | Demonstrates server certificate validation with trusted and untrusted HTTPS servers. |
| HTTPS client in C++ | Demonstrates the C++ wrapper style for HttpClient and streams JSON data into the BAS JSON parser. |
| FileReader | Source-only examples for implementing reader interfaces. FileCspReader shows how to implement a CspReader for CSP data generated by CspLink. FileZipReader shows how to implement a ZipReader for ZipIo. |
| misc | Common helper code used by several examples, including standalone startup code, host initialization, error handling, tracing, certificates, socket helpers, and memory/debug utilities. |
The example tree may also contain generated build output and support directories that are not intended as first entry points for learning BAS. Use the documented examples above as the stable starting points.