feat: update page

This commit is contained in:
2025-10-14 18:12:16 +02:00
parent 2f37486295
commit e531d7c1ba

View File

@@ -50,7 +50,7 @@
<div class="feature-grid"> <div class="feature-grid">
<div class="feature-card"> <div class="feature-card">
<h3>Auto Discovery</h3> <h3>Auto Discovery</h3>
<p>UDP-based node discovery with automatic cluster membership on port 4210</p> <p>UDP-based node discovery with automatic cluster membership</p>
</div> </div>
<div class="feature-card"> <div class="feature-card">
<h3>Health Monitoring</h3> <h3>Health Monitoring</h3>
@@ -86,17 +86,17 @@ class HelloService : public Service {
public: public:
HelloService() {} HelloService() {}
const char* getName() const override { return "hello"; } const char* getName() const override { return "HelloService"; }
void registerEndpoints(ApiServer& api) override { void registerEndpoints(ApiServer& api) override {
api.addEndpoint("/api/hello", HTTP_GET, [](AsyncWebServerRequest* req) { api.registerEndpoint("/api/hello", HTTP_GET, [](AsyncWebServerRequest* req) {
req->send(200, "application/json", "{\"message\":\"hello\"}"); req->send(200, "application/json", "{\"message\":\"hello\"}");
}); });
} }
void registerTasks(TaskManager& taskManager) override { void registerTasks(TaskManager& taskManager) override {
taskManager.registerTask("heartbeat", 1000, [this]() { this->heartbeat(); }); taskManager.registerTask("heartbeat", 1000, [this]() { this->heartbeat(); });
} }
private: private:
void heartbeat() { void heartbeat() {
@@ -111,7 +111,7 @@ Spore spore({
void setup() { void setup() {
spore.setup(); spore.setup();
spore.addService(new HelloService()); spore.registerService(new HelloService());
spore.begin(); spore.begin();
} }
@@ -124,8 +124,8 @@ void loop() {
<h3>Technical Specifications</h3> <h3>Technical Specifications</h3>
<ul> <ul>
<li><strong>Supported Hardware:</strong> ESP-01/ESP-01S (1MB Flash), Wemos D1 (4MB Flash)</li> <li><strong>Supported Hardware:</strong> ESP-01/ESP-01S (1MB Flash), Wemos D1 (4MB Flash)</li>
<li><strong>Discovery Protocol:</strong> UDP broadcast on port 4210</li> <li><strong>Discovery Protocol:</strong> Discovery and heartbeat via UDP broadcast</li>
<li><strong>API Interface:</strong> RESTful HTTP + WebSocket streaming</li> <li><strong>API Interface:</strong> RESTful HTTP + WebSocket and UDP streaming</li>
<li><strong>Dependencies:</strong> ESPAsyncWebServer, ArduinoJson</li> <li><strong>Dependencies:</strong> ESPAsyncWebServer, ArduinoJson</li>
<li><strong>Framework:</strong> Arduino with PlatformIO build system</li> <li><strong>Framework:</strong> Arduino with PlatformIO build system</li>
</ul> </ul>
@@ -178,7 +178,7 @@ void loop() {
<li><strong>Frontend:</strong> Vanilla JavaScript, CSS3, HTML5</li> <li><strong>Frontend:</strong> Vanilla JavaScript, CSS3, HTML5</li>
<li><strong>Architecture:</strong> Custom component-based framework</li> <li><strong>Architecture:</strong> Custom component-based framework</li>
</ul> </ul>
</div> </div>register
</div> </div>
</section> </section>