From 687b33a1370bf198ec584f46e1c84996e47052de Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Fri, 15 Dec 2023 20:34:00 +0200 Subject: [PATCH] net.http.file: fix oneline usage examples in the comments of file.serve/1 --- vlib/net/http/file/static_server.v | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vlib/net/http/file/static_server.v b/vlib/net/http/file/static_server.v index fb87ca23abaac5..9f7a0f43fc6ca1 100644 --- a/vlib/net/http/file/static_server.v +++ b/vlib/net/http/file/static_server.v @@ -19,11 +19,11 @@ pub mut: // serve will start a static files web server. // // The most common usage is the following: -// v -e 'import net.http; http.serve()' +// v -e 'import net.http.file; file.serve()' // which will listen for http requests on port 4001 by default, and serve all the files in the current folder. // -// Another example: `v -e 'import net.http; http.serve(folder: "/tmp")` , same but will serve all files inside the /tmp folder. -// Another example: `v -e 'import net.http; http.serve(folder: "~/Projects", on: ":5002")` , expose all the files inside the ~/Projects folder, on http://localhost:5002/ . +// Another example: `v -e 'import net.http.file; file.serve(folder: "/tmp")` , same but will serve all files inside the /tmp folder. +// Another example: `v -e 'import net.http.file; file.serve(folder: "~/Projects", on: ":5002")` , expose all the files inside the ~/Projects folder, on http://localhost:5002/ . pub fn serve(params StaticServeParams) { mut nparams := params nparams.folder = os.norm_path(os.real_path(params.folder))