summaryrefslogtreecommitdiff
path: root/go/file_server.go
diff options
context:
space:
mode:
authorpants <niklasjo2004@gmail.com>2026-09-21 14:17:03 -0700
committerpants <niklasjo2004@gmail.com>2026-09-21 14:17:03 -0700
commit7b21727285e50b0b050c4ddd70d07542229c5366 (patch)
tree5d369153c5df5b41f3750d25479a68f20169c8ff /go/file_server.go
init
Diffstat (limited to 'go/file_server.go')
-rw-r--r--go/file_server.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/go/file_server.go b/go/file_server.go
new file mode 100644
index 0000000..eb70101
--- /dev/null
+++ b/go/file_server.go
@@ -0,0 +1,11 @@
+package main
+
+import (
+ "log"
+ "net/http"
+)
+
+func main() {
+ // Simple static webserver:
+ log.Fatal(http.ListenAndServe("0.0.0.0:8080", http.FileServer(http.Dir("/home/nik"))))
+}