summaryrefslogtreecommitdiff
path: root/std/http/file_server.ts
diff options
context:
space:
mode:
authorWilliam Perron <hey@wperron.io>2020-11-19 21:59:45 -0500
committerGitHub <noreply@github.com>2020-11-19 21:59:45 -0500
commit8a6a2a50f7ee17deadf8b7de5761c8f156885584 (patch)
tree7ed87bc916a12b9b58765b4ba6d64fdfd43e7a44 /std/http/file_server.ts
parente582796f42b96a940cba757a8a08573bc61aca0c (diff)
docs(std): add missing jsdoc comments to exported functions (#8442)
includes: - http/file_server.ts - testing/_diff.ts - testing/asserts.ts Relates to #7487
Diffstat (limited to 'std/http/file_server.ts')
-rw-r--r--std/http/file_server.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/std/http/file_server.ts b/std/http/file_server.ts
index b75f9f9c1..331dbe5c5 100644
--- a/std/http/file_server.ts
+++ b/std/http/file_server.ts
@@ -112,6 +112,11 @@ function fileLenToString(len: number): string {
return `${(len / base).toFixed(2)}${suffix[suffixIndex]}`;
}
+/**
+ * Returns an HTTP Response with the requested file as the body
+ * @param req The server request context used to cleanup the file handle
+ * @param filePath Path of the file to serve
+ */
export async function serveFile(
req: ServerRequest,
filePath: string,