Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions monigo.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ import (
)

var (
//go:embed static/*
staticFiles embed.FS
BasePath string
baseAPIPath = "/monigo/api/v1"
//go:embed web/build/*
staticFiles embed.FS // Embedding the static files (SvelteKit build output)
Once sync.Once = sync.Once{} // Ensures that the storage is initialized only once
BasePath string // Base path for the monigo
baseAPIPath = "/monigo/api/v1" // Base API path for the dashboard

// Content-type mapping shared by both HTTP and Fiber static file handlers.
staticContentTypes = map[string]string{
Expand Down Expand Up @@ -660,7 +661,7 @@ func handleFiberAPI(c *fiber.Ctx, handler func(http.ResponseWriter, *http.Reques

// resolveStaticPath maps a URL path to an embedded file path and content type.
func resolveStaticPath(urlPath string) (filePath string, contentType string) {
baseDir := "static"
baseDir := "web/build"
filePath = baseDir + urlPath
if urlPath == "/" {
filePath = baseDir + "/index.html"
Expand Down Expand Up @@ -924,7 +925,7 @@ func isStaticFile(path string) bool {
}

staticPaths := []string{
"/css/", "/js/", "/assets/", "/images/", "/fonts/", "/static/",
"/css/", "/js/", "/assets/", "/images/", "/fonts/", "/static/",
}

for _, staticPath := range staticPaths {
Expand Down
Empty file added monigo/data/wal/0
Empty file.
Binary file removed static/.DS_Store
Binary file not shown.
Binary file removed static/API/.DS_Store
Binary file not shown.
6 changes: 0 additions & 6 deletions static/API/Req/reports.json

This file was deleted.

9 changes: 0 additions & 9 deletions static/API/Req/service-metrics.json

This file was deleted.

11 changes: 0 additions & 11 deletions static/API/Res/go-routines-stats.json

This file was deleted.

Loading