CommonJS + ESM + CLI + JSON
Build a configuration.
Every choice updates the copyable output. Links beside each group explain the exact Config key, default, and runtime behavior.
Choose values, then copy one format.
Module output
CommonJS and ESM include the full representable Config surface.
CLI output
Includes only flags the command supports and warns when advanced choices are omitted.
JSON output
A serializable Config object for module code or storage—not a CLI config file.
Run the generated snippet locally. This page assembles CJS, ESM, CLI, and JSON configuration. A local Node process exercises listener, filesystem, and TLS behavior. Review CLI quoting when paths contain shell control characters.
const {Server}=require('node-http-server');
const server=new Server({
host:'127.0.0.1',
port:8080,
root:'./public'
});
server.deploy();
npm install node-http-server