An express based application, inspired by mock-file-server, to be used as a CRUD file server storing content in the memory (temporal) or in the disk (permanent) of the server.
You can either install it globally o locally to your project
# global installation
npm install -g express-rest-file-server
# local installation
npm install express-rest-file-server
To start using it with default options, just run
# global installation
express-rest-file-server
# local installation
npx express-rest-file-server
- port: defaults to 5000
- storageType: can be
memory
ordisk
(defaults to memory) - storagePath: where to store the files if storage is set to
disk
(defaults to/tmp
)
Uploads a file to the store with its original name
Uploads a file to the store with a custom name (:filename)
Uploads a chuck of a file to the store with a custom name (:filename)
Builds a file from its chunks
Retrieve a file by its name
Retrieve a file size by its name
Remove a file by its name