viper-nacos-config-example

module
v0.0.0-...-2f1b851 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2023 License: Apache-2.0

README

Viper Nacos Config Example

Convention over Configuration

An out-of-the-box example of using Nacos configuration management with Viper.

Quick Start

中文

Remote

example

Start Nacos
docker-compose up
Config Nacos

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
Run
cd remote
go run .
Local

example

Start Nacos
docker-compose up
Run
cd local
go run .
Visit Nacos

Visit 127.0.0.1:8848/nacos on Browser.

The default username and password is nacos.

End

Just an Example

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL