Steeltoe Documentation
  • Why Steeltoe
    Overview Microservices Cloud Web Applications Event Driven
  • Get Started
    Steeltoe Initializr Guides Documentation API Browser Blog
  • Projects
    Steeltoe Application Configuration Steeltoe Circuit Breakers Steeltoe Dynamic Logging Steeltoe Management Steeltoe Messaging Steeltoe Network File Shares Steeltoe Security Steeltoe Service Connectors Steeltoe Service Discovery Steeltoe Stream
  • Support
  • Community
Search Results for

    Table of Contents
    . . .

    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

    1. Create a new ASP.NET Core WebAPI app with the Steeltoe Initializr Steeltoe Initialzr - Placeholder
    2. Name the project "PlaceholderExample"
    3. Add the "Placeholder" dependency
    4. Click Generate Project to download a zip containing the new project
    5. Extract the zipped project and open in your IDE of choice (we use Visual Studio)

    Run the application

    • .NET cli
    • Visual Studio
    dotnet run <PATH_TO>\PlaceholderExample.csproj
    

    Navigate to the endpoint (you may need to change the port number) http://localhost:5000/api/values

    1. Choose the top Debug menu, then choose Start Debugging (F5). This should bring up a browser with the app running.
    2. Navigate to the endpoint (you may need to change the port number) http://localhost:8080/api/values

    Once the app loads in the browser you will see the three values output.

    ["<PATH_ENV_VAR>","NotFound","Information"]

    X
    • Edit this page