Skip to content

RealTimeCom/fast-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Fast configuration utility for Fast Stream HTTP Server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published