Skip to content
This repository was archived by the owner on Mar 16, 2025. It is now read-only.

Repository files navigation

Static Content Handler

NPMBuild StatusCode QualityCoverageGitHub ProjectAPI Documentation

serveStatic()

This module contains a serveStatic() factory of request handler able to serve static content.

It is based on send and can be configured with similar options.

import{httpListener}from'@hatsy/hatsy';import{dispatchByName,Routing}from'@hatsy/router';import{serveStatic}from'@hatsy/serve-static';import{createServer}from'http';constserver=createServer(httpListener(Routing.for(dispatchByName({assets: serveStatic('static_html/assets',{extensions: ['png','jpeg','gif']}),}),),),);server.listen(8080);

About

Hatsy request handler that serves static content

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages