From 5b1e6bf2fa26cb9f26e877d0115e7e32b6e8355d Mon Sep 17 00:00:00 2001 From: Dan Sosedoff Date: Thu, 9 Oct 2014 19:05:51 -0500 Subject: [PATCH] Add static dir --- main.go | 3 +++ static/.gitkeep | 0 static/index.html | 1 + 3 files changed, 4 insertions(+) create mode 100644 static/.gitkeep create mode 100644 static/index.html diff --git a/main.go b/main.go index 7c989a6..5706a01 100644 --- a/main.go +++ b/main.go @@ -179,12 +179,15 @@ func main() { defer dbClient.db.Close() router := gin.Default() + router.GET("/databases", API_GetDatabases) router.GET("/tables", API_GetTables) router.GET("/tables/:name", API_GetTable) router.GET("/select", API_RunQuery) router.POST("/select", API_RunQuery) + router.Static("/app", "./static") + fmt.Println("Starting server at 0.0.0.0:8080") router.Run(":8080") } diff --git a/static/.gitkeep b/static/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/static/index.html b/static/index.html new file mode 100644 index 0000000..d9605cb --- /dev/null +++ b/static/index.html @@ -0,0 +1 @@ +HELLO \ No newline at end of file