Application Configuration Placeholders
This tutorial takes you through setting up a .NET Core application that uses placeholders for config values.
Note
For more detailed examples, please refer to the Placeholder project in the Steeltoe Samples Repository.
First, create a .NET Core WebAPI that has a placeholder implemented
- Create a new ASP.NET Core WebAPI app with the Steeltoe Initializr
- Name the project "PlaceholderExample"
- Add the "Placeholder" dependency
- Click Generate Project to download a zip containing the new project
- Extract the zipped project and open in your IDE of choice (we use Visual Studio)
Run the application
dotnet run <PATH_TO>\PlaceholderExample.csproj
Navigate to the endpoint (you may need to change the port number) http://localhost:5000/api/values
Once the app loads in the browser you will see the three values output.
["<PATH_ENV_VAR>","NotFound","Information"]