diff --git a/src/router/router.go b/src/router/router.go index a36a8a8..699dcdd 100644 --- a/src/router/router.go +++ b/src/router/router.go @@ -1,6 +1,7 @@ package router import ( + "fmt" "net/http" "github.com/gin-gonic/gin" @@ -23,7 +24,10 @@ func Create(env *envloader.Environment) *gin.Engine { router.Static("/home", env.StaticDir) - // TODO: Load 404 error Page + router.LoadHTMLGlob(fmt.Sprintf("%s404.html", env.StaticDir)) + router.NoRoute(func(ctx *gin.Context) { + ctx.HTML(http.StatusNotFound, "404.html", gin.H{}) + }) return router }