Skip to content

13angs/dotnet-consul-client

Repository files navigation

Dotnet consul register

Usage:

  • install the package
dotnet add package 13angs.Consul.Client --version 0.0.1
  • register the service in DI container
var consulConfig = Configuration.GetConsulConfig();
builder.Services.RegisterConsulServices(consulConfig);
  • update the appsetting.json
{
    "ConsulConfig": {
        "ServiceDiscoveryAddress": "http://dcc-consul-server1:8500",
        "ServiceAddress": "http://localhost:5117",
        "ServiceName": "dcc-sample",
        "ServiceId": "v1"
    }
}
  • Done!.

References

  1. https://learn.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package-using-the-dotnet-cli

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages