MCPcopy Create free account
hub / github.com/denoland/std / printUsage

Function printUsage

http/file_server.ts:914–942  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

912}
913
914function printUsage() {
915 // deno-lint-ignore no-console
916 console.log(`Deno File Server ${denoConfig.version}
917 Serves a local directory in HTTP.
918
919INSTALL:
920 deno install --allow-net --allow-read --allow-sys jsr:@std/http@${denoConfig.version}/file-server
921
922USAGE:
923 file_server [path] [options]
924
925OPTIONS:
926 -h, --help Prints help information
927 -p, --port <PORT> Set port (default is 8000)
928 --cors Enable CORS via the "Access-Control-Allow-Origin" header
929 --host <HOST> Hostname (default is 0.0.0.0)
930 -c, --cert <FILE> TLS certificate file (enables TLS)
931 -k, --key <FILE> TLS key file (enables TLS)
932 -H, --header <HEADER> Sets a header on every request.
933 (e.g. --header "Cache-Control: no-cache")
934 This option can be specified multiple times.
935 --no-dir-listing Disable directory listing
936 --no-dotfiles Do not show dotfiles
937 --no-cors Disable cross-origin resource sharing
938 -v, --verbose Print request level logs
939 -V, --version Print version information
940
941 All TLS options are required when one is provided.`);
942}
943
944if (import.meta.main) {
945 main();

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected