Skip to content

Commit

Permalink
docs: add documentation for embed.go
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinanielsen committed Dec 22, 2023
1 parent 18fb57b commit 5e340ed
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ui/embed.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ import (
//go:embed build
var staticFS embed.FS

// AddRoutes serves the static file system for the UI React App.
// AddRoutes configures the router with middleware to serve the embedded
// React frontend. It serves the frontend as static files from the
// embedded build folder. It also configures a fallback filesystem to
// always serve index.html for unknown routes.
func AddRoutes(router gin.IRouter) {
embeddedBuildFolder := newStaticFileSystem()
fallbackFileSystem := newFallbackFileSystem(embeddedBuildFolder)
Expand Down

0 comments on commit 5e340ed

Please sign in to comment.