hswaw/site: serve static
This adds a minimum serving Go binary, and static/template file
embedding.
The templates are not yet served or even loaded. The static files are
served at /static/..., eg.:
$ curl 127.0.0.1:8080/static/mapka.png
Change-Id: Iedd8696db2c2e5d434dc2e7fbd0199d0f6ee5fff
diff --git a/hswaw/site/BUILD.bazel b/hswaw/site/BUILD.bazel
new file mode 100644
index 0000000..7af2940
--- /dev/null
+++ b/hswaw/site/BUILD.bazel
@@ -0,0 +1,19 @@
+load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
+
+go_library(
+ name = "go_default_library",
+ srcs = ["main.go"],
+ importpath = "code.hackerspace.pl/hscloud/hswaw/site",
+ visibility = ["//visibility:private"],
+ deps = [
+ "//go/mirko:go_default_library",
+ "//hswaw/site/static:static_go",
+ "@com_github_golang_glog//:go_default_library",
+ ],
+)
+
+go_binary(
+ name = "site",
+ embed = [":go_default_library"],
+ visibility = ["//visibility:public"],
+)