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"}`)
|
_, _ = fmt.Fprintf(w, `{"result":"ok"}`)
|
||||||
})
|
})
|
||||||
|
|
||||||
port := ":10002"
|
log.Println("Server is start up! port", cfg.Port)
|
||||||
log.Println("Server is start up! port", port)
|
log.Fatal(http.ListenAndServe(cfg.Port, nil))
|
||||||
log.Fatal(http.ListenAndServe(port, nil))
|
|
||||||
}()
|
}()
|
||||||
|
|
||||||
for update := range updates {
|
for update := range updates {
|
||||||
|
|
|
@ -6,6 +6,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
type AppConfig struct {
|
type AppConfig struct {
|
||||||
|
Port string
|
||||||
MongoConfig *MongoConfig
|
MongoConfig *MongoConfig
|
||||||
TgConfig *TgConfig
|
TgConfig *TgConfig
|
||||||
}
|
}
|
||||||
|
@ -42,6 +43,7 @@ func NewAppConfig() *AppConfig {
|
||||||
token = strings.ReplaceAll(token, "\n", "")
|
token = strings.ReplaceAll(token, "\n", "")
|
||||||
|
|
||||||
return &AppConfig{
|
return &AppConfig{
|
||||||
|
Port: ":10002",
|
||||||
MongoConfig: &MongoConfig{
|
MongoConfig: &MongoConfig{
|
||||||
URL: mongoURL,
|
URL: mongoURL,
|
||||||
DBName: dbName,
|
DBName: dbName,
|
||||||
|
|
Loading…
Reference in New Issue