fduarte42/zend-expressive-static-files

A PSR-15 middleware that serves static assets for you. Is similar to the "serve-static" npm package.

1.2.8 2022-08-09 14:35 UTC

This package is auto-updated.

Last update: 2024-11-09 19:56:30 UTC


README

A PSR-15 middleware that serves static assets for you

Laminas/Mezzio

Use https://github.com/fduarte42/laminas-static-files for a laminas/mezzio and php 8 compatible version

Example usage:

$app->pipe('/fun-module/assets', new \Fduarte42\StaticFiles\StaticFilesMiddleware(
    __DIR__ . '/../vendor/fund-module/public',
    ['publicCachePath' => __DIR__ . '/../public/fun-module/assets']
));

This is a fork of Serve Static https://github.com/reliv/serve-static