httpstatic

1.1.0 • Public • Published

HTTP Static

Simple HTTP static server with caching and multi-domain applications from a single server. Minimal resource usage.
Static folder files are cached and served directly, for multiple domains.

Examples

// serve static memory cached pages from a.com and b.com
//  ./static/a.com/index.html
//  ./static/b.com/index.html

// Run script
handler.js in current directory is used to handle requests
$ port=81 nocache=1 node httpstatic.js  # Optional port, nocache

// include
// use alternate request handling
require('./httpstatic.js')(function(r, s){
  s.write('processing..');
  s.end(); // dont serve the page
});

Readme

Keywords

none

Package Sidebar

Install

npm i httpstatic

Weekly Downloads

2

Version

1.1.0

License

none

Unpacked Size

2.44 kB

Total Files

4

Last publish

Collaborators

  • dpweb