Convention over Configuration
An out-of-the-box example of using Nacos configuration management with Viper.
docker-compose up
Visit 127.0.0.1:8848/nacos
on Browser.
The default username and password is nacos
.
Add MySQL configuration
- Data ID:
example-remote
- Group:
example-remote
mysql:
host: 127.0.0.1
port: 3306
username: root
password: 114514
database: example-remote
cd remote
go run .
docker-compose up
cd local
go run .
Visit 127.0.0.1:8848/nacos
on Browser.
The default username and password is nacos
.
Just an Example