-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathmain.go
More file actions
32 lines (27 loc) · 849 Bytes
/
main.go
File metadata and controls
32 lines (27 loc) · 849 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package main
import (
"github.com/yoruakio/gowebserver/config"
"github.com/yoruakio/gowebserver/http"
"github.com/yoruakio/gowebserver/logger"
)
func main() {
config.LoadConfig()
cfg := config.GetConfig()
logger.Info("=== Server Configuration ===")
logger.Infof("Host: %s:%s", cfg.Host, cfg.Port)
logger.Infof("Login URL: %s", cfg.LoginUrl)
logger.Infof("Server CDN: %s", cfg.ServerCdn)
if cfg.ServerMeta != "" {
logger.Infof("Server Meta: %s", cfg.ServerMeta)
}
logger.Infof("Logging: %v", cfg.Logger)
logger.Infof("Rate Limit: %d requests per %d minutes", cfg.RateLimit, cfg.RateLimitDuration)
if cfg.EnableGeo {
logger.Infof("Geo Location: Enabled (Regions: %v)", cfg.GeoLocation)
} else {
logger.Info("Geo Location: Disabled")
}
logger.Info("===========================")
app := http.Initialize()
http.Start(app)
}