change display ip to correct ip with port 1323

This commit is contained in:
E44
2025-11-04 21:11:22 +01:00
parent 6c042c8129
commit c042ce5ef6
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -23,10 +23,10 @@ func main() {
os.Exit(1)
return
}
port := "1323"
go web.StartWebServer(VERSION, port)
go web.StartWebServer(VERSION)
err = shared.OpenBrowserWindow("https://example.com", true, true)
err = shared.OpenBrowserWindow("http://localhost:"+port, true, true)
if err != nil {
slog.Error("Failed to open browser window", "error", err)
os.Exit(1)
+2 -2
View File
@@ -37,7 +37,7 @@ var supportedExtensions = map[string]bool{
".odp": true,
}
func StartWebServer(v string) {
func StartWebServer(v string, port string) {
version = v
e := echo.New()
@@ -63,7 +63,7 @@ func StartWebServer(v string) {
fileGroup.PATCH("/:path", openFileRoute)
fileGroup.GET("/preview/:path", previewRoute)
err := e.Start(":1323")
err := e.Start(":" + port)
if err != nil {
slog.Error("Failed to start server", "error", err)
}