add port to config
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
92634ce744
commit
11d3adf8db
|
@ -92,9 +92,8 @@ func run() {
|
|||
_, _ = fmt.Fprintf(w, `{"result":"ok"}`)
|
||||
})
|
||||
|
||||
port := ":10002"
|
||||
log.Println("Server is start up! port", port)
|
||||
log.Fatal(http.ListenAndServe(port, nil))
|
||||
log.Println("Server is start up! port", cfg.Port)
|
||||
log.Fatal(http.ListenAndServe(cfg.Port, nil))
|
||||
}()
|
||||
|
||||
for update := range updates {
|
||||
|
|
|
@ -6,6 +6,7 @@ import (
|
|||
)
|
||||
|
||||
type AppConfig struct {
|
||||
Port string
|
||||
MongoConfig *MongoConfig
|
||||
TgConfig *TgConfig
|
||||
}
|
||||
|
@ -42,6 +43,7 @@ func NewAppConfig() *AppConfig {
|
|||
token = strings.ReplaceAll(token, "\n", "")
|
||||
|
||||
return &AppConfig{
|
||||
Port: ":10002",
|
||||
MongoConfig: &MongoConfig{
|
||||
URL: mongoURL,
|
||||
DBName: dbName,
|
||||
|
|
Loading…
Reference in New Issue