How to send a page of html+css using gin?

Oe5bi1S.png
router.NoRoute(noRoute)

noRoute func(c *gin.Context) {
 c.HTML(http.StatusNotFound, "404.html", nil)
}
April 7th 20 at 10:42
2 answers
April 7th 20 at 10:44
gene is full of examples

look at github, there is JSON and HTML

there are a couple of lessons in Russian, there seems to be JSON
I clearly wrote a question, the html+css how to send JSON or HTML, Yes, obviously, it works, but HTML+CSS - Amanda.Lark commented on April 7th 20 at 10:47
and, well, if then, no issues

if anything, the pie on an empty stomach only one
and the text in the answer you can only send one (do not care stick it all in the template, or double-separate post) - Cecil.Wa commented on April 7th 20 at 10:50
@Cecil.Wa, I don't know what you said, asking the obvious answer, you write postoronniy, class - Amanda.Lark commented on April 7th 20 at 10:53
@Amanda.Lark, you can see I have how the site works on gin: https://github.com/Enos_Schamberger/feedflow/blob/master/...

routeStatic func(router *gin.Engine, string prefix) {
 router.Static(prefix, "./assets")
 router.Static("js", "./frontend/dist/js")
 router.Static("css", "./frontend/dist/css")
}
- Enos_Schamberger commented on April 7th 20 at 10:56
April 7th 20 at 10:46
As I understand it, it's OK to return a static page (HTML, and possibly other formats), with a connected file, can only function http.FileServer().
He fought with a similar problem.

Find more questions by tags Go