hswaw/oodviewer: init
This brings oodviewer into k0.
oodviewer started as a py2/flask script running on q3k's personal infra,
which is now being turned down.
This is a rewrite of that script into similarly mediocre Go, conforming
to the exact same mediocre JSON API and spartan HTML interface.
This also deploys it into k0 in the oodviewer-prod namespace. It's
already running, but the 'oodviewer.q3k.me' TTL has to expire before it
begins handling traffic.
Change-Id: Ieef1b0f8f0c60e6fa5dbe7701e0a07a4257f99ce
diff --git a/hswaw/oodviewer/templates/BUILD.bazel b/hswaw/oodviewer/templates/BUILD.bazel
new file mode 100644
index 0000000..be98820
--- /dev/null
+++ b/hswaw/oodviewer/templates/BUILD.bazel
@@ -0,0 +1,20 @@
+load("@io_bazel_rules_go//go:def.bzl", "go_library")
+load("@io_bazel_rules_go//extras:embed_data.bzl", "go_embed_data")
+
+go_embed_data(
+ name = "templates_data",
+ srcs = glob(["*.html"]),
+ package = "templates",
+ flatten = True,
+)
+
+go_library(
+ name = "go_default_library",
+ srcs = [
+ ":templates_data", # keep
+ ],
+ visibility = [
+ "//hswaw/oodviewer:__pkg__",
+ ],
+ importpath = "code.hackerspace.pl/hscloud/hswaw/oodviewer/templates",
+)