1
0

Set NotFound handler in main.

This commit is contained in:
Alexander Andreev 2022-02-07 22:52:01 +04:00
parent 8fdf0b61e2
commit de77530962
Signed by: Arav
GPG Key ID: 1327FE8A374CC86F

View File

@ -75,6 +75,7 @@ func main() {
hand := handlers.NewUploadHandlers(config, logErr, logUpload, logDownload)
srv := server.NewHttpServer()
srv.SetNotFoundHandler(hand.NotFound)
srv.ServeStatic("/assets/*filepath", http.Dir(config.WebDir+"/assets"))
srv.GET("/", hand.Index)
srv.POST("/", hand.Upload)