serves static files
This commit is contained in:
+3
-1
@@ -14,7 +14,9 @@ func main() {
|
||||
htmlRender := ron.NewHTMLRender()
|
||||
r.Renderer = htmlRender
|
||||
|
||||
r.GET("/", helloWorld)
|
||||
r.Static("static", "static")
|
||||
|
||||
//r.GET("/", helloWorld)
|
||||
r.GET("/json", helloWorldJSON)
|
||||
r.POST("/another", anotherHelloWorld)
|
||||
r.GET("/html", helloWorldHTML)
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
@@ -8,6 +8,8 @@
|
||||
|
||||
<body>
|
||||
|
||||
<img src="/static/img/dummy.png">
|
||||
|
||||
{{ .Data.message }}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user