Migrate to LittleFS under ESP8266

Make ESP8266 use LittleFS instead of deprecated SPIFFS
Make framework use the correct filesystem automatically and handle the call the FS.begin()
Change default MQTT keepalive to 60 seconds
Fix lodash security issue
This commit is contained in:
rjwats authored and GitHub committed 2020-07-19 19:32:08 +01:00
1 parent 6ef5df28c1
commit c16f7693fd
13 files changed
+52 -46

No files matched your search

+2 -10
View File
@@ -1,14 +1,13 @@
#include <ESP8266React.h>
#include <LightMqttSettingsService.h>
#include <LightStateService.h>
#include <FS.h>
#define SERIAL_BAUD_RATE 115200
AsyncWebServer server(80);
ESP8266React esp8266React(&server, &SPIFFS);
ESP8266React esp8266React(&server);
LightMqttSettingsService lightMqttSettingsService =
LightMqttSettingsService(&server, &SPIFFS, esp8266React.getSecurityManager());
LightMqttSettingsService(&server, esp8266React.getFS(), esp8266React.getSecurityManager());
LightStateService lightStateService = LightStateService(&server,
esp8266React.getSecurityManager(),
esp8266React.getMqttClient(),
@@ -18,13 +17,6 @@ void setup() {
// start serial and filesystem
Serial.begin(SERIAL_BAUD_RATE);
// start the file system (must be done before starting the framework)
#ifdef ESP32
SPIFFS.begin(true);
#elif defined(ESP8266)
SPIFFS.begin();
#endif
// start the framework and demo project
esp8266React.begin();