{"id":19736227,"url":"https://github.com/arnauld/dotnet-core-micro-services","last_synced_at":"2026-05-08T10:36:00.597Z","repository":{"id":138356939,"uuid":"133423583","full_name":"Arnauld/dotnet-core-micro-services","owner":"Arnauld","description":"Experimentation dotnet core micro-services; consul...","archived":false,"fork":false,"pushed_at":"2018-05-15T22:27:02.000Z","size":76,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-16T23:48:47.742Z","etag":null,"topics":["consul","dotnet-core","postgresql"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Arnauld.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-14T21:27:53.000Z","updated_at":"2018-05-16T06:20:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"f6de83cd-a2cb-44bc-a08f-6ffaf277e471","html_url":"https://github.com/Arnauld/dotnet-core-micro-services","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Arnauld/dotnet-core-micro-services","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arnauld%2Fdotnet-core-micro-services","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arnauld%2Fdotnet-core-micro-services/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arnauld%2Fdotnet-core-micro-services/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arnauld%2Fdotnet-core-micro-services/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Arnauld","download_url":"https://codeload.github.com/Arnauld/dotnet-core-micro-services/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arnauld%2Fdotnet-core-micro-services/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32776930,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"ssl_error","status_checked_at":"2026-05-08T08:22:45.650Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["consul","dotnet-core","postgresql"],"created_at":"2024-11-12T01:05:48.260Z","updated_at":"2026-05-08T10:36:00.577Z","avatar_url":"https://github.com/Arnauld.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"```\nMentem: ~/Projects/dotnet\n→ dotnet new webapi -o shipping\nLe modèle 'ASP.NET Core Web API' a été créé.\nCe modèle contient des technologies d'éditeurs autres que Microsoft. Pour plus de détails, consultez https://aka.ms/template-3pn.\n\nTraitement des actions postcréation...\nExécution de 'dotnet restore' sur shipping/shipping.csproj...\n  Restoring packages for /Users/Arnauld/Projects/dotnet/shipping/shipping.csproj...\n  Restoring packages for /Users/Arnauld/Projects/dotnet/shipping/shipping.csproj...\n  Restore completed in 1,34 sec for /Users/Arnauld/Projects/dotnet/shipping/shipping.csproj.\n  Generating MSBuild file /Users/Arnauld/Projects/dotnet/shipping/obj/shipping.csproj.nuget.g.props.\n  Generating MSBuild file /Users/Arnauld/Projects/dotnet/shipping/obj/shipping.csproj.nuget.g.targets.\n  Restore completed in 2,92 sec for /Users/Arnauld/Projects/dotnet/shipping/shipping.csproj.\n\n\nRestauration réussie.\n```\n\n## Add JSON\n\n```\nMentem: ~/Projects/dotnet\n→ dotnet add shipping package  Newtonsoft.Json\n  Writing /var/folders/46/ld5hyvbd2yz3tj9gy9rcl3ym0000gn/T/tmpk1JMC9.tmp\ninfo : Adding PackageReference for package 'Newtonsoft.Json' into project '/Users/Arnauld/Projects/dotnet/shipping/shipping.csproj'.\nlog  : Restoring packages for /Users/Arnauld/Projects/dotnet/shipping/shipping.csproj...\ninfo :   GET https://api.nuget.org/v3-flatcontainer/newtonsoft.json/index.json\ninfo :   OK https://api.nuget.org/v3-flatcontainer/newtonsoft.json/index.json 496ms\ninfo :   GET https://api.nuget.org/v3-flatcontainer/newtonsoft.json/11.0.2/newtonsoft.json.11.0.2.nupkg\ninfo :   OK https://api.nuget.org/v3-flatcontainer/newtonsoft.json/11.0.2/newtonsoft.json.11.0.2.nupkg 505ms\nlog  : Installing Newtonsoft.Json 11.0.2.\ninfo : Package 'Newtonsoft.Json' is compatible with all the specified frameworks in project '/Users/Arnauld/Projects/dotnet/shipping/shipping.csproj'.\ninfo : PackageReference for package 'Newtonsoft.Json' version '11.0.2' added to file '/Users/Arnauld/Projects/dotnet/shipping/shipping.csproj'.\n```\n\n## Add Consul Client\n\n```\nMentem: ~/Projects/dotnet\n→ dotnet add shipping package  Consul\n  Writing /var/folders/46/ld5hyvbd2yz3tj9gy9rcl3ym0000gn/T/tmpWVDvad.tmp\ninfo : Adding PackageReference for package 'Consul' into project '/Users/Arnauld/Projects/dotnet/shipping/shipping.csproj'.\nlog  : Restoring packages for /Users/Arnauld/Projects/dotnet/shipping/shipping.csproj...\ninfo :   GET https://api.nuget.org/v3-flatcontainer/consul/index.json\ninfo :   OK https://api.nuget.org/v3-flatcontainer/consul/index.json 619ms\ninfo :   GET https://api.nuget.org/v3-flatcontainer/consul/0.7.2.4/consul.0.7.2.4.nupkg\ninfo :   OK https://api.nuget.org/v3-flatcontainer/consul/0.7.2.4/consul.0.7.2.4.nupkg 521ms\ninfo :   GET https://api.nuget.org/v3-flatcontainer/system.net.http.winhttphandler/index.json\ninfo :   OK https://api.nuget.org/v3-flatcontainer/system.net.http.winhttphandler/index.json 501ms\ninfo :   GET https://api.nuget.org/v3-flatcontainer/system.net.http.winhttphandler/4.0.0/system.net.http.winhttphandler.4.0.0.nupkg\ninfo :   OK https://api.nuget.org/v3-flatcontainer/system.net.http.winhttphandler/4.0.0/system.net.http.winhttphandler.4.0.0.nupkg 512ms\nlog  : Installing System.Net.Http.WinHttpHandler 4.0.0.\nlog  : Installing Consul 0.7.2.4.\ninfo : Package 'Consul' is compatible with all the specified frameworks in project '/Users/Arnauld/Projects/dotnet/shipping/shipping.csproj'.\ninfo : PackageReference for package 'Consul' version '0.7.2.4' added to file '/Users/Arnauld/Projects/dotnet/shipping/shipping.csproj'.\n```\n\n## Update dependencies\n\n```\nMentem: ~/Projects/dotnet/shipping\n→ dotnet restore\n  Restoring packages for /Users/Arnauld/Projects/dotnet/shipping/shipping.csproj...\n  Restore completed in 83,03 ms for /Users/Arnauld/Projects/dotnet/shipping/shipping.csproj.\n  Restore completed in 2,05 sec for /Users/Arnauld/Projects/dotnet/shipping/shipping.csproj.\n```\n\n## Connect to consul and start app\n\n```\nMentem: ~/Projects/dotnet/shipping\n→ dotnet run\nService 'postgres': \u003c172.19.0.7:5432\u003e\nService 'rabbitmq': \u003c172.19.0.3:5672\u003e\nService 'vault': \u003c172.19.0.2:8200\u003e\nService 'telegraf-statsd': \u003c172.19.0.8:8125\u003e\nHosting environment: Production\nContent root path: /Users/Arnauld/Projects/dotnet/shipping\nNow listening on: http://localhost:5000\nApplication started. Press Ctrl+C to shut down.\n^CApplication is shutting down...\n```\n\n## Add logger\n\n```\nMentem: ~/Projects/dotnet\n→ dotnet add shipping package Microsoft.Extensions.Logging.Console\n→ dotnet add shipping package Microsoft.Extensions.Logging\n```\n\n## Add \n\n\n## HTTP query\n\nIn the first terminal\n\n```\n→ dotnet run\ninfo: shipping.Startup[0]\n      Service 'postgres': \u003c172.19.0.7:5432\u003e\ninfo: shipping.Startup[0]\n      Service 'rabbitmq': \u003c172.19.0.3:5672\u003e\ninfo: shipping.Startup[0]\n      Service 'vault': \u003c172.19.0.2:8200\u003e\ninfo: shipping.Startup[0]\n      Service 'telegraf-statsd': \u003c172.19.0.8:8125\u003e\nHosting environment: Production\nContent root path: /Users/Arnauld/Projects/dotnet/shipping\nNow listening on: http://localhost:5000\nApplication started. Press Ctrl+C to shut down.\n```\n\nIn the second terminal\n\n```\n→ curl -X GET http://localhost:5000/api/shipping/12345\n{\"Id\":\"12345\",\"Recipient\":\"carmen@mccall.um\"}%\n```\n\n## Database \u0026 ORM\n\n```\n→ dotnet add shipping package Npgsql\n→ dotnet add shipping package Dapper\n```\n\n# Resources\n\n* [Building a Secure Containerized Microservice With .NET Core](https://dzone.com/articles/building-a-secure-containerized-microservice-with)\n* [Getting started with .NET Core on macOS](https://docs.microsoft.com/en-us/dotnet/core/tutorials/using-on-macos)\n* [Using Consul for Service Discovery with ASP.NET Core](https://cecilphillip.com/using-consul-for-service-discovery-with-asp-net-core/)\n* [PostgreSQL and Dapper in .Net Core – Part 1](https://dotnetcorecentral.com/blog/postgresql-and-dapper-in-net-core-part-1/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farnauld%2Fdotnet-core-micro-services","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farnauld%2Fdotnet-core-micro-services","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farnauld%2Fdotnet-core-micro-services/lists"}