feat: update domain config

This commit is contained in:
hanif salafi 2024-09-11 10:36:15 +07:00
parent f035d024cd
commit 0f03ecd9ad
4 changed files with 5 additions and 3 deletions

View File

@ -162,7 +162,7 @@ func (_i *ppidDataCategoriesService) SaveThumbnail(c *fiber.Ctx) (err error) {
return err return err
} }
host := _i.Cfg.App.Host host := _i.Cfg.App.Domain
port := _i.Cfg.App.ExternalPort port := _i.Cfg.App.ExternalPort
_i.Log.Info().Str("timestamp", time.Now(). _i.Log.Info().Str("timestamp", time.Now().

View File

@ -82,7 +82,7 @@ func (_i *ppidDataFilesService) Save(c *fiber.Ctx) (err error) {
return err return err
} }
host := _i.Cfg.App.Host host := _i.Cfg.App.Domain
port := _i.Cfg.App.ExternalPort port := _i.Cfg.App.ExternalPort
form, err := c.MultipartForm() form, err := c.MultipartForm()

View File

@ -16,6 +16,7 @@ import (
type app = struct { type app = struct {
Name string `toml:"name"` Name string `toml:"name"`
Host string `toml:"host"` Host string `toml:"host"`
Domain string `toml:"domain"`
Port string `toml:"port"` Port string `toml:"port"`
ExternalPort string `toml:"external-port"` ExternalPort string `toml:"external-port"`
PrintRoutes bool `toml:"print-routes"` PrintRoutes bool `toml:"print-routes"`

View File

@ -1,8 +1,9 @@
# Configuration vars for cmd/app # Configuration vars for cmd/app
[app] [app]
name = "Fiber starter" name = "Fiber starter"
host = "http://localhost" host = "http://103.82.242.92"
port = ":8800" port = ":8800"
domain = "https://103.82.242.92"
external-port = ":8888" external-port = ":8888"
idle-timeout = 5 # As seconds idle-timeout = 5 # As seconds
print-routes = false print-routes = false