the little, simple command line file server
Well know from node.js, this little tool simply serves static content. The following details can be configured:
- the path at which serve will serve the files, e.g.
/assets/ - the directory to serve, e.g.
~or.ordiror/app/static/ - the port to listen on
- whether to use basic auth or not, and if so, with which password
- whether to fall back to serving a file e.g.
index.html, instead of serving a 404 (for Single Page Applications)
Serve the current directory on localhost:8080:
serveServe the home directory on localhost:8080:
serve --dir $HOMEServe the current directory on localhost:3000:
serve --port 3000Serve the home directory on localhost:8080, protected with username "foo" and password "bar":
serve --dir $HOME --user:pass foo:barServe an asset directory on localhost:8080/static/:
serve --dir assets --path staticFall back to index.html instead of serving 404s:
serve --fallback ./index.html