Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kamalshkeir committed Jul 25, 2022
1 parent f2137ca commit 83adba1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
5 changes: 1 addition & 4 deletions core/kamux/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ func (router *Router) initServer() {
} else {
handler = router
}
// add global cors
host := settings.GlobalConfig.Host
if host == "" {
host = "127.0.0.1"
Expand All @@ -46,9 +45,7 @@ func (router *Router) initServer() {
ReadTimeout: 5 * time.Second,
WriteTimeout: 20 * time.Second,
IdleTimeout: 20 * time.Second,
}
fmt.Printf(logger.Yellow, logger.Ascii7)
fmt.Printf(logger.Blue, "-------⚡🚀 http://"+host+":"+port+" 🚀⚡-------")
}
router.Server=&server
}

Expand Down
14 changes: 14 additions & 0 deletions core/kamux/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"embed"
"encoding/csv"
"encoding/json"
"fmt"
"io/fs"
"net/http"
"os"
Expand Down Expand Up @@ -62,6 +63,19 @@ func (router *Router) LoadEnv(files ...string) {
}
}

func (router *Router) PrintServerStart() {
host := settings.GlobalConfig.Host
if host == "" {
host = "127.0.0.1"
}
port := settings.GlobalConfig.Port
if port == "" {
port = "9313"
}
fmt.Printf(logger.Yellow, logger.Ascii7)
fmt.Printf(logger.Blue, "-------⚡🚀 http://"+host+":"+port+" 🚀⚡-------")
}

func LoadTranslations() {
if dir,err := os.Stat(settings.TranslationFolder);err == nil && dir.IsDir() {
err = filepath.WalkDir(dir.Name(),func(path string, d fs.DirEntry, err error) error {
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.2
0.5.3

0 comments on commit 83adba1

Please sign in to comment.