diff options
author | Adam Mathes <adam@trenchant.org> | 2017-02-09 19:40:44 -0800 |
---|---|---|
committer | Adam Mathes <adam@trenchant.org> | 2017-02-09 19:40:44 -0800 |
commit | ded6e3b25bca083cabe21bda6f4d01f6766587bc (patch) | |
tree | 2855fa24e8b2f939bdf091f5faca411e7884ac83 /web | |
download | snkt-ded6e3b25bca083cabe21bda6f4d01f6766587bc.tar.gz snkt-ded6e3b25bca083cabe21bda6f4d01f6766587bc.tar.bz2 snkt-ded6e3b25bca083cabe21bda6f4d01f6766587bc.zip |
initial commit (fmstatic -> snkt)
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) +} |