Skip to content

Commit 8b6f5c1

Browse files
committed
[FEATURE]: Add production in launchSettings.
1 parent 0ba18de commit 8b6f5c1

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

Program.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
if(builder.Environment.IsDevelopment())
2121
{
2222
// In development, load secrets from user secrets here
23-
// Load secrets from environment variables
2423
builder.Configuration.AddUserSecrets<Program>(optional: true);
2524
}
2625

Properties/launchSettings.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,19 @@
1414
"dotnetRunMessages": true,
1515
"launchBrowser": true,
1616
"applicationUrl": "http://0.0.0.0:5001",
17+
"environmentVariables": {
18+
"ASPNETCORE_ENVIRONMENT": "Development"
19+
}
20+
},
21+
"production":{
22+
"commandName": "Project",
23+
"dotnetRunMessages": true,
24+
"launchBrowser": false,
25+
"applicationUrl": "http://0.0.0.0:5000",
1726
"environmentVariables": {
1827
"ASPNETCORE_ENVIRONMENT": "Production"
1928
}
2029
},
21-
2230
"https": {
2331
"commandName": "Project",
2432
"dotnetRunMessages": true,

0 commit comments

Comments
 (0)