추가중 ..
This commit is contained in:
parent
96f8d6f794
commit
02bafb4dc9
3
main.go
3
main.go
|
@ -47,7 +47,7 @@ func main() {
|
||||||
r.StaticFS("/static", route.Static(""))
|
r.StaticFS("/static", route.Static(""))
|
||||||
|
|
||||||
r.GET("/api", route.Api)
|
r.GET("/api", route.Api)
|
||||||
r.GET("/page", route.Page)
|
r.GET("/self", route.Self)
|
||||||
r.GET("/metric", route.Metric)
|
r.GET("/metric", route.Metric)
|
||||||
r.GET("/health", func(c *gin.Context) {
|
r.GET("/health", func(c *gin.Context) {
|
||||||
c.String(200, "OK! - mnemonics services are fully operational!")
|
c.String(200, "OK! - mnemonics services are fully operational!")
|
||||||
|
@ -58,7 +58,6 @@ func main() {
|
||||||
r.HTMLRender = util.Default()
|
r.HTMLRender = util.Default()
|
||||||
r.GET("/", route.Index)
|
r.GET("/", route.Index)
|
||||||
|
|
||||||
|
|
||||||
glog.Info("bootstrapped application")
|
glog.Info("bootstrapped application")
|
||||||
r.Run() // listen and server on 0.0.0.0:8080
|
r.Run() // listen and server on 0.0.0.0:8080
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
package model
|
|
@ -0,0 +1,4 @@
|
||||||
|
package model
|
||||||
|
|
||||||
|
|
||||||
|
inter
|
|
@ -2,7 +2,7 @@ package route
|
||||||
|
|
||||||
import "github.com/gin-gonic/gin"
|
import "github.com/gin-gonic/gin"
|
||||||
|
|
||||||
func Page(c *gin.Context) {
|
func Self(c *gin.Context) {
|
||||||
content := gin.H{"Hello": "World"}
|
content := gin.H{"Hello": "World"}
|
||||||
c.JSON(200, content)
|
c.JSON(200, content)
|
||||||
}
|
}
|
Loading…
Reference in New Issue