From a4f4d44c89f8863aeb8bf9ff5b3bbadbf9c96ae5 Mon Sep 17 00:00:00 2001 From: George Shaw Date: Tue, 17 Oct 2017 14:34:46 -0500 Subject: [PATCH] 1-line fileserver --- main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.go b/main.go index a8a019d..586f71a 100644 --- a/main.go +++ b/main.go @@ -54,4 +54,9 @@ func main() { log.Print("Listening on localhost:2082") http.ListenAndServe("localhost:2082", g) + + // This entire program can be replaced with the following: + /* + log.Fatal(http.ListenAndServe('localhost:2082', http.FileServer(http.Dir('private/')))); + */ }