© Les Jackson 2020
L. JacksonThe Complete ASP.NET Core 3 API Tutorialhttps://doi.org/10.1007/978-1-4842-6255-9_8

8. Environment Variables and User Secrets

Les Jackson1 
(1)
Melbourne, VIC, Australia
 

Chapter Summary

In this chapter we discuss what runtime environments are and how to configure them; we’ll then discuss what user secrets are and how to use them.

When Done, You Will

  • Understand what runtime environments are.

  • How to set them via the ASPNETCORE_ENVIRONMENT variable.

  • Understand the role of launchSettings.json and appsettings.json files.

  • What user secrets are.

  • How to use user secrets to solve the problem we had at the end of the last chapter.

Environments

When developing anything, you typically want the freedom to try new code, refactor existing code ...

Get The Complete ASP.NET Core 3 API Tutorial: Hands-On Building, Testing, and Deploying now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.