cesanta/mongoose ? reverse-engineered prompt
Reverse engineered prompt
Build me a small C app using Mongoose that acts like a simple IoT device dashboard and demo server.
I want it to run on a desktop first, but keep it easy to move to embedded hardware later. It should serve a basic web page, expose a few JSON endpoints like device status and current time, and support live updates in the browser with WebSocket. If possible, add a simple MQTT client mode too so it can publish status and subscribe to commands.
Please make the app easy to run from one main file, with clear comments and a tiny example web folder or built in HTML so I can open it in a browser right away. Keep the code practical and minimal, but make sure it reconnects cleanly and doesn’t crash if the network drops.
If you need current usage details, look up the latest Mongoose docs online.
Are you gonna build this?
make sure you review the code using coderabbit