config.go 817 B

1234567891011121314151617181920212223
  1. package conf
  2. import (
  3. beego "github.com/beego/beego/v2/server/web"
  4. )
  5. func init() {
  6. //beego.LoadAppConfig("ini", "a/conf/app.conf")
  7. }
  8. var HTTPPort, _ = beego.AppConfig.Int("httpport")
  9. var AppName, _ = beego.AppConfig.String("appname")
  10. // Mysql
  11. var MysqlServer_UrlPort, _ = beego.AppConfig.String("MysqlServer_UrlPort")
  12. var MysqlServer_Database, _ = beego.AppConfig.String("MysqlServer_Database")
  13. var MysqlServer_Username, _ = beego.AppConfig.String("MysqlServer_Username")
  14. var MysqlServer_Password, _ = beego.AppConfig.String("MysqlServer_Password")
  15. var MysqlServer_MaxIdleConnections, _ = beego.AppConfig.Int("MysqlServer_MaxIdleConnections")
  16. var MysqlServer_MaxOpenConnections, _ = beego.AppConfig.Int("MysqlServer_MaxOpenConnections")
  17. // Nats
  18. var NatsServer_Url, _ = beego.AppConfig.String("NatsServer_Url")