tar-serve-http
v1.2.0
Published
expose a tar contents as an http server
Downloads
19
Readme
Motivation
tar-serve-http exposes a tar archive contents as an http middleware.
API/usage
const http = require('http');
const mountTar = require('tar-serve-http');
var server = http.createServer(mountTar("/some/file.tar"));
server.listen(0, function() {
let port = this.address().port;
console.log("tar contents is now accessible on http://localhost:%d/", port);
server.close(); //close server and release tar
});