Today, I would like to share an embedded web server that I have been using for a long time: Mongoose. I have also used Lighttpd, Boa, Nginx and many other similar web servers. We usually select a few commonly used ones for research based on system performance and resources, in order to maximize their potential! From my experience, Mongoose is similar to Boa and is often used in low-performance web server scenarios. However, Mongoose is more widely adaptable.Hardware Compatibility:
- Compatible with Linux/UNIX, MacOS, Windows, Android
- Compatible with STMicroelectronics, NXP, ESP32, Nordic, TI, Microchip, Infineon, Renesas, and other chips
Software Compatibility:
- Written in C/C++, seamlessly integrates with C programs, and the API is simple and easy to use
- Provides an event-driven, non-blocking API for TCP, UDP, HTTP, WebSocket, MQTT, and other protocols
- Built-in pure TCP/UDP, SNTP, HTTP, MQTT, WebSocket, and other protocols
- Includes a TCP/IP stack with drivers for bare metal or RTOS systems
- Easy to integrate, just copy the mongoose.c and mongoose.h files into your source code
- A wealth of use cases, online design tools, etc., to help us develop quickly
- Minimal software dependencies, stable and reliable, with many well-known companies launching commercial products based on Mongoose
The following image is part of the introduction on GitHub (https://github.com/cesanta/mongoose):
On Mongoose’s official website (https://mongoose.ws), there are many video tutorials available for learning:
Provides online design tools to quickly build your code examples:
Rich and clear documentation tutorials are available to answer all your questions:
The reason I recommend it is that it is compact, simple, and easy to use. Below are some web screenshots from my actual projects (communication management machines/gateways, etc.):
The backend interfaces corresponding to these functions are also quite simple. Based on years of product testing, it has proven to be very stable and reliable, and being written in C ensures its efficiency.I most frequently use Mongoose’s web, HTTP, and WebSocket functionalities, and have also used it on platforms like STM32 and ESP32. More details on interface usage, platform porting cases, etc., will be shared in future installments. Regarding Mongoose, I plan to create a serialized column. Thank you all for your attention!