Closed scorelocity closed 1 year ago
A basic solution could just load in the items you want one by one. Dotnet comes with methods to access these plainly: https://learn.microsoft.com/en-us/dotnet/api/system.environment.getenvironmentvariable?view=net-7.0
You could also give FsConfig a shot. Just replace the hardcoded libraries with that.
As noted, it supports Environment Variables, AppConfig, Json Files, INI files (similar to the typical .env found in other ecosystems), XML.
Also some notes in this blog post about env vars and .env files.
@Banashek - Thank you. Closing.
Is there an idiomatic way in Saturn to externalize configuration information, such as connection strings, so that it can be different in different environments, such as development, staging and production? The Saturn template has a connection string hard-coded in Program.fs and I don't see any other suggestions in the documentation or samples.
I'm also confused on how I might use built-in dotnet core configuration approaches, appsettings, user secrets, environment variables, etc., in Saturn.