Skip to content

Commit 4dc327b

Browse files
committed
Small changes
1 parent a768cf5 commit 4dc327b

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

docs/recipes/developing-and-testing/app-configuration.md renamed to docs/recipes/developing-and-testing/specify-app-settings.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# How do I add custom configuration?
2-
There are many ways to supply configuration settings e.g. connection strings to your application, and the [official ASP .NET documentation](https://learn.microsoft.com/en-us/aspnet/core/fundamentals/configuration/?view=aspnetcore-8.0) explains in great detail the various options you have available.
1+
# How do I add custom application settings?
2+
There are many ways to supply custom application settings e.g. connection strings to your application, and the [official ASP .NET documentation](https://learn.microsoft.com/en-us/aspnet/core/fundamentals/configuration/?view=aspnetcore-8.0) explains in great detail the various options you have available.
33

44
## Configuration of the Server
55
In this recipe, we show how to add configuration using an `appsettings.json` configuration file.
@@ -34,7 +34,10 @@ let todosApi (context: HttpContext) =
3434
++ let cfg = context.GetService<IConfiguration>()
3535
++ let value = cfg["MyKey"] // "My appsettings.json Value"
3636
```
37-
> Note that the `todosApi` function will be called on every single ASP .NET request. It is safe to "capture" the `cfg` value and use it across multiple API methods.
37+
> Note that the `todosApi` function will be called on every single ASP .NET request. It is safe to "capture" the `cfg` value and use it across multiple API methods.
38+
39+
### Publishing settings files
40+
Be aware that `appsettings.json` files will be included in your bundle by default. However, depending on your application, it can be overridden by e.g. environment variables.
3841

3942
## Working with User Secrets
4043
User Secrets are an alternative way of storing secrets which, although still stored in plain text files, are not stored in your repository folder and therefore less at risk to accidentally committing into source control. However, Saturn currently disables User Secrets as part of its startup routine, and you must manually turn them back on:

mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ nav:
8989
- Test the Client: "recipes/developing-and-testing/testing-the-client.md"
9090
- Test the Server: "recipes/developing-and-testing/testing-the-server.md"
9191
- Debug a SAFE app: "recipes/developing-and-testing/debug-safe-app.md"
92-
- Application Configuration: "recipes/developing-and-testing/app-configuration.md"
92+
- Specify app settings: "recipes/developing-and-testing/specify-app-settings.md"
9393
- UI:
9494
- Add Tailwind support: "recipes/ui/add-tailwind.md"
9595
- Remove Tailwind support: "recipes/ui/remove-tailwind.md"

0 commit comments

Comments
 (0)