-
-
Notifications
You must be signed in to change notification settings - Fork 195
Open
Description
It would be useful to abstract the filesystem API so that, for example, in-memory files can be served.
I have a proof-of-concept (or even solution?) at 6c87c36. It adds an fs property to the options which requires fs.stat and fs.createReadStream functions. Set the environment variable USE_MEMFS before running tests and the test will use memfs. memory-fs doesn't work because the fs.Stats objects it creates only has functions attached and not all of the usual properties.
Related: expressjs/serve-static#83
Reactions are currently unavailable