random-access-http-server
Server and middleware to serve read only random access storages over HTTP.
Status
Stable
Installation
$ npm install random-access-http-server
Usage
const createServer = const raf = const server =
const http = const raf = const onrequest = { // same as above return } const server = http
API
const server = createServer(opts)
Creates a new
http.Server
instance with opts
passed directly to
middleware(opts)
.
const onrequest = middleware(opts)
Creates a new middleware function (onrequest(req, res, next)
) suitable
for handling
request
and response
objects from a
http.Server
.
License
MIT