From 88ab821c584b6f25dfc4dbf26932a7def1dc0df1 Mon Sep 17 00:00:00 2001 From: Alexandre Tuleu Date: Mon, 25 Jan 2016 10:08:56 +0100 Subject: [PATCH] Adds a static website --- router.go | 2 ++ static/css/.gitkeep | 0 static/html/.gitkeep | 0 static/index.html | 8 ++++++++ static/js/.gitkeep | 0 5 files changed, 10 insertions(+) create mode 100644 static/css/.gitkeep create mode 100644 static/html/.gitkeep create mode 100644 static/index.html create mode 100644 static/js/.gitkeep diff --git a/router.go b/router.go index 009caca..250f460 100644 --- a/router.go +++ b/router.go @@ -74,5 +74,7 @@ func (a *appData) buildRouter() http.Handler { } })).Methods("GET") + router.PathPrefix("/").Handler(http.FileServer(http.Dir("static"))) + return router } diff --git a/static/css/.gitkeep b/static/css/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/static/html/.gitkeep b/static/html/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/static/index.html b/static/index.html new file mode 100644 index 0000000..c437a64 --- /dev/null +++ b/static/index.html @@ -0,0 +1,8 @@ + + + Hello World ! + + +

Hello World!

+ + diff --git a/static/js/.gitkeep b/static/js/.gitkeep new file mode 100644 index 0000000..e69de29