fast-config

1.0.0 • Public • Published

fast-config

Fast configuration utility for Fast Stream HTTP Server

$ npm install fast-config

Example

const get = require('fast-config');
 
const files = get('/path/src');
// OR, with options
const files = get('/path/src', {
    // file '/path/src/index.html' required
    index: 'index.html', // path URL '/' content
    cache: true, // read files as Buffer, 'false' is default
    recursive: true // read sub-directory tree contents, 'true' is default
});

Host config example

const get = require('fast-config');
const http = require('fast-stream'); // Fast Stream HTTP Server
const conf = {
    '*': get('/path/src') // Host "*" <for all>
};
require('net').createServer(sk => sk.pipe(new http(conf)).pipe(sk)).listen(80);

For more info, consult Fast Stream HTTP Server


fast-config is licensed under the MIT license. See the included LICENSE file for more details.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    1
  • 0.0.1
    1

Package Sidebar

Install

npm i fast-config

Weekly Downloads

2

Version

1.0.0

License

MIT

Last publish

Collaborators

  • realtimecom