Skip to content

Commit c5c10af

Browse files
committed
[fx] IOC registrations, camel case parameters
[fix] launch paths [add] MyProject.Angular SPA Launch
1 parent b2d5ff8 commit c5c10af

File tree

2 files changed

+33
-8
lines changed

2 files changed

+33
-8
lines changed

.vscode/launch.json

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"type": "coreclr",
77
"request": "launch",
88
"preLaunchTask": "Build",
9-
"program": "${workspaceFolder}/src/templates/MyProject.Angular/bin/Debug/net7.0/MyProject.Angular.dll",
9+
"program": "${workspaceFolder}/src/templates/MyProject.Angular/bin/Debug/net8.0/MyProject.Angular.dll",
1010
"cwd": "${workspaceFolder}/src/templates/MyProject.Angular",
1111
"internalConsoleOptions": "openOnSessionStart",
1212
"serverReadyAction": {
@@ -18,13 +18,31 @@
1818
"ASPNETCORE_ENVIRONMENT": "Development"
1919
}
2020
},
21+
{
22+
"name": "MyProject.Angular SPA Launch",
23+
"type": "coreclr",
24+
"request": "launch",
25+
"preLaunchTask": "Build",
26+
"program": "${workspaceFolder}/src/templates/MyProject.Angular/bin/Debug/net8.0/MyProject.Angular.dll",
27+
"cwd": "${workspaceFolder}/src/templates/MyProject.Angular",
28+
"internalConsoleOptions": "openOnSessionStart",
29+
"serverReadyAction": {
30+
"action": "openExternally",
31+
"pattern": "Now listening on",
32+
"uriFormat": "http://localhost:5000"
33+
},
34+
"env": {
35+
"ASPNETCORE_ENVIRONMENT": "Development",
36+
"ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.SpaProxy"
37+
}
38+
},
2139
{
2240
"name": "MyProject.Api Launch",
2341
"type": "coreclr",
2442
"request": "launch",
2543
"preLaunchTask": "Build",
26-
"program": "${workspaceFolder}/src/templates/MyProject.Api/bin/Debug/net7.0/MyProject.Api.dll",
27-
"cwd": "${workspaceFolder}/src/templates/MyProject.Api/bin/Debug/net7.0/",
44+
"program": "${workspaceFolder}/src/templates/MyProject.Api/bin/Debug/net8.0/MyProject.Api.dll",
45+
"cwd": "${workspaceFolder}/src/templates/MyProject.Api/bin/Debug/net8.0/",
2846
"internalConsoleOptions": "openOnSessionStart",
2947
"serverReadyAction": {
3048
"action": "openExternally",
@@ -40,8 +58,8 @@
4058
"type": "coreclr",
4159
"request": "launch",
4260
"preLaunchTask": "Build",
43-
"program": "${workspaceFolder}/src/templates/MyProject.Minimal/bin/Debug/net7.0/MyProject.Minimal.dll",
44-
"cwd": "${workspaceFolder}/src/templates/MyProject.Minimal/bin/Debug/net7.0/",
61+
"program": "${workspaceFolder}/src/templates/MyProject.Minimal/bin/Debug/net8.0/MyProject.Minimal.dll",
62+
"cwd": "${workspaceFolder}/src/templates/MyProject.Minimal/bin/Debug/net8.0/",
4563
"internalConsoleOptions": "openOnSessionStart",
4664
"serverReadyAction": {
4765
"action": "openExternally",
@@ -57,8 +75,8 @@
5775
"type": "coreclr",
5876
"request": "launch",
5977
"preLaunchTask": "Build",
60-
"program": "${workspaceFolder}/src/templates/MyProject.SchedulerApi/bin/Debug/net7.0/MyProject.SchedulerApi.dll",
61-
"cwd": "${workspaceFolder}/src/templates/MyProject.SchedulerApi/bin/Debug/net7.0/",
78+
"program": "${workspaceFolder}/src/templates/MyProject.SchedulerApi/bin/Debug/net8.0/MyProject.SchedulerApi.dll",
79+
"cwd": "${workspaceFolder}/src/templates/MyProject.SchedulerApi/bin/Debug/net8.0/",
6280
"internalConsoleOptions": "openOnSessionStart",
6381
"serverReadyAction": {
6482
"action": "openExternally",

src/templates/MyProject.Angular/Program.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1+
using System.Text.Json;
12
using Simplify.Web;
3+
using Simplify.Web.Responses;
4+
5+
Json.DefaultOptions = new JsonSerializerOptions
6+
{
7+
PropertyNamingPolicy = JsonNamingPolicy.CamelCase
8+
};
29

310
var builder = WebApplication.CreateBuilder(args);
411

@@ -25,7 +32,7 @@
2532
app.UseSpaStaticFiles();
2633
}
2734

28-
app.UseSimplifyWebNonTerminal();
35+
app.UseSimplifyWebNonTerminal(true);
2936

3037
// Production use: proxying from .NET to Angular
3138
if (!app.Environment.IsDevelopment())

0 commit comments

Comments
 (0)