Functions
createStaticFileHandler
createStaticFileHandler(root
, opts
?): (req
) => Promise
<null
| Response
>
Creates an HTTP handler function which serves file contents from the filesystem.
Parameters
Parameter | Type | Description |
---|---|---|
root | PathLike | Root directory where static files are served from |
opts ? | StaticFileHandlerOpts | Optional options object |
Returns
Function
Parameters
Parameter | Type |
---|---|
req | Request |
Returns
Promise
<null
| Response
>