koa-static

E553129

koa-static is a middleware package for the Koa web framework that serves static files such as HTML, CSS, JavaScript, and images from a specified directory.

Jump to: Statements Referenced by

Statements (36)

Predicate Object
instanceOf Koa middleware
Node.js middleware package
static file server middleware
canBeInstalledWith npm install koa-static
yarn add koa-static
configurationOption brotli
defer
gzip
hidden
index
maxage
root directory path
setHeaders callback
distribution npm package
ecosystem Node.js NERFINISHED
framework Koa NERFINISHED
importStyle const serve = require('koa-static');
import serve from 'koa-static';
license MIT License
primaryFunction serve static files
programmingLanguage JavaScript
servesFileTypes CSS
HTML
JavaScript NERFINISHED
images
other static assets
supportsFeature Brotli compression (when used with upstream middleware/server)
HTTP caching via Cache-Control headers
custom response headers
gzip compression (when used with upstream middleware/server)
serving hidden files (optional)
serving index files
supportsFrameworkVersion Koa v2 NERFINISHED
typicalUsage mount as middleware in a Koa application
serve assets from a public directory
usageExample app.use(serve(__dirname + '/public'));

Referenced by (1)

Full triples — surface form annotated when it differs from this entity's canonical label.

Koa ecosystem koa-static