mirror of
https://github.com/Floriansylvain/RenewCMS.git
synced 2026-08-19 11:43:22 +02:00
fix: update file path separator in .air.toml and improve server start message
This commit is contained in:
@@ -4,7 +4,7 @@ tmp_dir = "tmp"
|
|||||||
|
|
||||||
[build]
|
[build]
|
||||||
args_bin = []
|
args_bin = []
|
||||||
bin = "tmp\\main.exe"
|
bin = "tmp/main.exe"
|
||||||
cmd = "go build -o ./tmp/main.exe ./main"
|
cmd = "go build -o ./tmp/main.exe ./main"
|
||||||
delay = 1000
|
delay = 1000
|
||||||
exclude_dir = ["assets", "tmp", "vendor", "testdata", "api\\static\\tinymce", "api\\static\\bootstrap-icons", "api\\static\\uploadedImages"]
|
exclude_dir = ["assets", "tmp", "vendor", "testdata", "api\\static\\tinymce", "api\\static\\bootstrap-icons", "api\\static\\uploadedImages"]
|
||||||
|
|||||||
@@ -4,10 +4,11 @@ import (
|
|||||||
"RenewCMS/api"
|
"RenewCMS/api"
|
||||||
"RenewCMS/main/route"
|
"RenewCMS/main/route"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/go-chi/chi/v5"
|
|
||||||
"github.com/joho/godotenv"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
|
"github.com/go-chi/chi/v5"
|
||||||
|
"github.com/joho/godotenv"
|
||||||
)
|
)
|
||||||
|
|
||||||
var possibleEnvFileLocations = []string{".env", "../.env"}
|
var possibleEnvFileLocations = []string{".env", "../.env"}
|
||||||
@@ -52,7 +53,7 @@ func InitServer() *chi.Mux {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func StartServer(router *chi.Mux) error {
|
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)
|
err := http.ListenAndServe(":"+os.Getenv("PORT"), router)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user