0.4.3 • Published 7 months ago

static-handler v0.4.3

Weekly downloads
-
License
ISC
Repository
github
Last release
7 months ago

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.

# as CLI
npx static-handler --help
// 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);
0.4.3

7 months ago

0.4.1

11 months ago

0.4.0

11 months ago

0.4.2

11 months ago

0.3.2

1 year ago

0.3.1

2 years ago

0.1.0

2 years ago

0.0.1

2 years ago

0.3.0

2 years ago

0.1.2

2 years ago

0.2.0

2 years ago

0.1.1

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.0.0

2 years ago