# static-handler **Repository Path**: mirrors_WebReflection/static-handler ## Basic Information - **Project Name**: static-handler - **Description**: A very simple static files handler. - **Primary Language**: Unknown - **License**: ISC - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-12-02 - **Last Updated**: 2026-07-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # static-handler A very simple static files handler, useful for testing, debugging purpose, or whenever a very basic static file server is needed as fallback/resource. ```sh # as CLI npx static-handler --help ``` ```js // as utility const staticHandler = require('static-handler'); const handled = staticHandler(__dirname); require('http').createServer((req, res) => { // handled as static content, returns true if (handled(req, res)) return; // do anything else }).listen(8080); ```