These are chat archives for gin-gonic/gin

13th
Apr 2017
greta-burp-bonus
@greta-burp-bonus
Apr 13 2017 03:04
hey guys
how would you create a "catch all" route with gin?
Bo-Yi Wu
@appleboy
Apr 13 2017 03:56
gin-gonic/gin#880
greta-burp-bonus
@greta-burp-bonus
Apr 13 2017 04:02
yep :p
noRoute works fine for this
greta-burp-bonus
@greta-burp-bonus
Apr 13 2017 04:08
ugh
@appleboy so if i have a noRoute that serves ./dist/index.html
and my static files are in ./dist/static
how would i serve those?
I tried some combinations of
router.StaticFS("/more_static", http.Dir("my_file_system"))
router.StaticFile("/favicon.ico", "./resources/favicon.ico")
Bo-Yi Wu
@appleboy
Apr 13 2017 04:09
yean
yeah
greta-burp-bonus
@greta-burp-bonus
Apr 13 2017 04:10
its staticFS isnt it?
wouldn't i just need to point /dist/static/ to static?
i mean i see the example but it doesnt seem to work for me
@appleboy
greta-burp-bonus
@greta-burp-bonus
Apr 13 2017 04:17
alright
got it working.. thanks