0.3.0 • Published 4 years ago
donny v0.3.0
donny
as a surfer he explored the beaches of Southern California, from La Jolla to Leo Carrillo and up to Pismo

donny serves a directory of files via HTTP. That's it. It works similarly to
python3 -m http.server or ruby -run -e httpd and is not intended to be
used in production. Use it in development only.
Usage via CLI
Simply run
donnyto serve the current directory on port 8080. You can also run:
donny -p 9000 -b 127.0.0.1 distto bind to port 9000 for bind address 127.0.0.1 and serve the dist folder.
Usage as a library
let donny = require("donny");
donny({
port: "9000",
bind: "127.0.0.1",
webroot: "dist"
}).then(() => {
console.error("Serving 'dist' on port 9000");
});Comparison to other solutions
- It has no dependencies except minimist.
- In comparison to servedir, it serves the index.html when asked for a directory instead of listing the contents.
License
donny is licensed under the Apache 2.0 License.