Neolithic Psychedelic Mushrooms

    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.

    Install

    npm i fast-config

    DownloadsWeekly Downloads

    2

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • realtimecom