diff --git a/.gitignore b/.gitignore index fdceac52f967af12471e5f7c64d2e46d1161d3b4..96f2a5d7a7c71cc7e3fa5a30dfbaca10707e8b78 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,4 @@ tmp bin temp *.log -*.yaml .DS_Store \ No newline at end of file diff --git a/service/demo/config/config.yaml b/service/demo/config/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ef3be7b83e57a78bc426f4c90c0997d4a30add7a --- /dev/null +++ b/service/demo/config/config.yaml @@ -0,0 +1,24 @@ +Server: + Name: "service.demo" + ConsulServer: + - 192.168.233.1:8500 + Grpc: + Addr: "" # 为空随机端口, 使用注册中心服务发现 + Http: + Addr: "" + +Mysql: + dsn: remote:admin666@tcp(127.0.0.1:3306)/test?loc=Local&charset=utf8mb4&writeTimeout=3s&readTimeout=3s&timeout=1s&parseTime=true + MaxConn: 8 + MaxIdleConn: 2 + MaxLifetime: 1800 # 连接有效时间,单位秒 + Debug: true + +Redis: + Addr: 127.0.0.1:6379 + Password: "" + DB: 15 + +Log: + Color: true + Level: DEBUG \ No newline at end of file