Streaming from NodeMCU #6465
Replies: 1 comment
-
Posted at 2023-02-25 by @MaBecker have a look at https://www.espruino.com/Reference#StorageFile Posted at 2023-02-25 by beweOnline Thanks for your reply! While I can slice up the file into chunks and write a GET response using the node.js drain event as explained in the tutorial mentioned above, I was hoping someone could shed light on the whole matter. I'm curious as to why E.pipe() is available when E.openFile() is not! What's the use case here? Anyways, I post my WIP here, in case somebody's wondering. This goes into the routing callback function you'd supply to the createServer() method:
Posted at 2023-03-14 by GermanWarez I would not use ESP8266 for a web server, because it is slow. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2023-02-25 by beweOnline
Dear all!
Reading a file with require("Storage").read() but running out of mem with larger files, like serving a ~20kb html file. So I want to stream instead as suggested here. However, if the NodeMCU hasn't got E.openFile(), how then do you open a file for streaming such that I might use E.pipe()?
Scratching my head over this one. Any help much appreaciated!
Beta Was this translation helpful? Give feedback.
All reactions