You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/dotnet-webapi-boilerplate/fundamentals/configurations.md
+104
Original file line number
Diff line number
Diff line change
@@ -68,6 +68,8 @@ Depends on the client consuming the WebAPI.
68
68
```
69
69
## Database
70
70
71
+
By default, the dbprovider is set to postgresql. You will also have to change the connection string that is defined in hangfire.json.
72
+
71
73
```json
72
74
{
73
75
"DatabaseSettings": {
@@ -76,3 +78,105 @@ Depends on the client consuming the WebAPI.
76
78
}
77
79
}
78
80
```
81
+
82
+
For details about other database providers, [refer this page](http://localhost:1313/dotnet-webapi-boilerplate/general/getting-started/#setting-up-the-connection-string)
83
+
84
+
## Localization
85
+
86
+
The outgoing responses can be localized using this. The client would have to pass the following header to receive localized responses.
87
+
88
+
```
89
+
Accept-Language: <local-key>
90
+
```
91
+
92
+
Here, the locale-key can be anything like fr,de, it and so on. The default locale is set to english.
93
+
94
+
```json
95
+
{
96
+
"LocalizationSettings": {
97
+
"EnableLocalization": true,
98
+
"ResourcesPath": "Localization",
99
+
"SupportedCultures": [
100
+
"en-US",
101
+
"en",
102
+
"fr",
103
+
"fr-FR",
104
+
"de",
105
+
"de-DE",
106
+
"it",
107
+
"it-IT",
108
+
"pt",
109
+
"nl",
110
+
"nl-NL"
111
+
],
112
+
"DefaultRequestCulture": "en",
113
+
"FallbackToParent": true
114
+
}
115
+
}
116
+
```
117
+
118
+
## Logger
119
+
120
+
FSH internally uses Serilog for logging. Here is the configuration for logger.
121
+
122
+
```json
123
+
{
124
+
"LoggerSettings": {
125
+
"AppName": "FSH.WebApi",
126
+
"ElasticSearchUrl": "http://localhost:9200",
127
+
"WriteToFile": true,
128
+
"StructuredConsoleLogging": false
129
+
}
130
+
}
131
+
```
132
+
133
+
ElasticSearchUrl -> If this is empty, serilog will ignore writing to elastic cache.
134
+
WriteToFile -> JSON structured logging to file. These log files can be found under the ./src/Host/Logs folder.
135
+
StructuredConsoleLogging -> This can be useful when deploying the application to AWS ECS, for better Cloudwatch logging.
136
+
137
+
## Mail
138
+
139
+
We use Ethereal, a fake SMTP Service for mocking email transactions. Don't worry, the included credentials are valid, but you can create your own as well. Check [ethereal](https://ethereal.email/)
0 commit comments