Skip to content

Commit

Permalink
feat(controller): show UI in homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
adhocore committed Mar 13, 2021
1 parent 6083ff0 commit 17596cc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion controller/frontend.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@ import (

// Index is the controller for root aka index page
// It responds to `GET /` and does not require auth token.
func Index(res http.ResponseWriter, _ *http.Request) {
func Index(res http.ResponseWriter, req *http.Request) {
http.ServeFile(res, req, "tmpl/home.html")
}

// Status is the controller for health/status check
// It responds to `GET /status` and does not require auth token.
func Status(res http.ResponseWriter, _ *http.Request) {
response.JSON(res, http.StatusOK, response.Body{"message": "it works"})
}

Expand Down

0 comments on commit 17596cc

Please sign in to comment.