summaryrefslogtreecommitdiff
path: root/static.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-03-25 20:00:38 +0100
committerDimitri Sokolyuk <demon@dim13.org>2015-03-25 20:00:38 +0100
commitec277ab95f2147017a55816f533cdb2ee3f811ed (patch)
tree9998043c13d873b480bf5410146fad8aa0235d33 /static.go
Initial import
Diffstat (limited to 'static.go')
-rw-r--r--static.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/static.go b/static.go
new file mode 100644
index 0000000..3c32d6b
--- /dev/null
+++ b/static.go
@@ -0,0 +1,18 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build !appengine
+
+// This file implements a stand-alone blog server.
+
+package main
+
+import (
+ "net/http"
+)
+
+func init() {
+ fs := http.FileServer(http.Dir("htdocs/static"))
+ http.Handle("/static/", http.StripPrefix("/static/", fs))
+}