working on sending the new location form data, and getting it from the backend
This commit is contained in:
@@ -12,7 +12,7 @@ import (
|
||||
var defaultConfig = `# All values in this config file WILL BE overwritten by ENV variables (GI_SERVER_PORT for example) if they exist.
|
||||
Server:
|
||||
port: 3500
|
||||
locationPhotoDir: "./app/photos/locations/"
|
||||
LocationFilesDir: "./app/photos/locations/"
|
||||
|
||||
Logger:
|
||||
loglevel: "debug" # debug/info/warn/error
|
||||
@@ -31,7 +31,7 @@ type Config struct {
|
||||
Timezone string `fig:"tz" default:"America/New_York"`
|
||||
Server struct {
|
||||
Port string `fig:"port" default:"3000"`
|
||||
LocationPhotoDir string `fig:"locationPhotoDir" default:"./app/photos/locations/"`
|
||||
LocationFilesDir string `fig:"LocationFilesDir" default:"./app/photos/locations/"`
|
||||
}
|
||||
Logger struct {
|
||||
Level string `fig:"loglevel" default:"info"`
|
||||
@@ -101,7 +101,7 @@ func LoadConfig(s *Server) error {
|
||||
}
|
||||
s.Log = zerolog.New(logFile).With().Timestamp().Logger()
|
||||
// Creating photo directory
|
||||
err = os.MkdirAll(cfg.Server.LocationPhotoDir, 0755)
|
||||
err = os.MkdirAll(cfg.Server.LocationFilesDir, 0755)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user