diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/web.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/web/web.go b/web/web.go new file mode 100644 index 0000000..2a320ea --- /dev/null +++ b/web/web.go @@ -0,0 +1,11 @@ +package web + +import ( + "net/http" +) + +func Serve(addr string, webroot string) { + fs := http.FileServer(http.Dir(webroot)) + http.Handle("/", fs) + http.ListenAndServe(addr, nil) +} |