@coco-platform/static-server
v0.4.4
Published
lite static server.
Downloads
22
Readme
@coco-platform/static-server
lite static server.
Options
/**
* @description - start static server, validate options before call
*
* @param {object} options
* @param {string} options.root - the static root directory, prefer absolute path
* @param {number} options.port - listen port
* @param {string} options.subject - mark project prefix path, useful when treat as sub-project
* @param {string} options.silent - ignore request path logs
*
* @return {object} - HTTP server instance
*/
Usage
const server = require('@coco-platform/static-server');
server.bootstrap({
root,
port,
subject,
proxy
});
License
MIT