From 99812ddba4d2b36660b3d0a3a05f9e56f6228f53 Mon Sep 17 00:00:00 2001 From: Floriansylvain Date: Sat, 13 Dec 2025 18:53:17 +0100 Subject: [PATCH] fix: update file path separator in .air.toml and improve server start message --- .air.toml | 2 +- main/server/server.go | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.air.toml b/.air.toml index cc88d09..ec12a31 100644 --- a/.air.toml +++ b/.air.toml @@ -4,7 +4,7 @@ tmp_dir = "tmp" [build] args_bin = [] - bin = "tmp\\main.exe" + bin = "tmp/main.exe" cmd = "go build -o ./tmp/main.exe ./main" delay = 1000 exclude_dir = ["assets", "tmp", "vendor", "testdata", "api\\static\\tinymce", "api\\static\\bootstrap-icons", "api\\static\\uploadedImages"] diff --git a/main/server/server.go b/main/server/server.go index 6cf3637..87569ff 100644 --- a/main/server/server.go +++ b/main/server/server.go @@ -4,10 +4,11 @@ import ( "RenewCMS/api" "RenewCMS/main/route" "fmt" - "github.com/go-chi/chi/v5" - "github.com/joho/godotenv" "net/http" "os" + + "github.com/go-chi/chi/v5" + "github.com/joho/godotenv" ) var possibleEnvFileLocations = []string{".env", "../.env"} @@ -52,7 +53,7 @@ func InitServer() *chi.Mux { } func StartServer(router *chi.Mux) error { - fmt.Println("Server starting on :" + os.Getenv("PORT")) + fmt.Println("Server starting on http://" + os.Getenv("HOST")) err := http.ListenAndServe(":"+os.Getenv("PORT"), router) return err }