flux init

This commit is contained in:
Zoe
2024-12-09 05:58:50 -06:00
parent 85718a135b
commit 1dbb689860
6 changed files with 17 additions and 12 deletions

View File

@@ -39,7 +39,7 @@ import (
//go:embed assets/** templates/** schema.sql
var embeddedAssets embed.FS
var devContent string = `<script>
var devContent = `<script>
let host = window.location.hostname;
const socket = new WebSocket('ws://' + host + ':2067/ws');
@@ -571,7 +571,10 @@ func main() {
})
engine.AddFunc("devContent", func() string {
return devContent
if os.Getenv("PASSPORT_DEV_MODE") == "true" {
return devContent
}
return ""
})
router := fiber.New(fiber.Config{