Install ESP8266 NodeMCU LittleFS Filesystem Uploader in Arduino IDE.Learn more about using LittleFS with the ESP8266, you can read: To keep our project better organized and easier to understand, we’ll save the HTML, CSS, and JavaScript files to build the web page on the board’s filesystem (LittleFS). ESP8266 NodeMCU Web Server using Server-Sent Events (Update Sensor Readings Automatically).
To learn more about SSE with the ESP8266, you can read: