Skip to content

Commit

Permalink
[fx] IOC registrations, camel case parameters
Browse files Browse the repository at this point in the history
[fix] launch paths
[add] MyProject.Angular SPA Launch
  • Loading branch information
i4004 committed Jun 3, 2024
1 parent b2d5ff8 commit c5c10af
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 8 deletions.
32 changes: 25 additions & 7 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "Build",
"program": "${workspaceFolder}/src/templates/MyProject.Angular/bin/Debug/net7.0/MyProject.Angular.dll",
"program": "${workspaceFolder}/src/templates/MyProject.Angular/bin/Debug/net8.0/MyProject.Angular.dll",
"cwd": "${workspaceFolder}/src/templates/MyProject.Angular",
"internalConsoleOptions": "openOnSessionStart",
"serverReadyAction": {
Expand All @@ -18,13 +18,31 @@
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
{
"name": "MyProject.Angular SPA Launch",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "Build",
"program": "${workspaceFolder}/src/templates/MyProject.Angular/bin/Debug/net8.0/MyProject.Angular.dll",
"cwd": "${workspaceFolder}/src/templates/MyProject.Angular",
"internalConsoleOptions": "openOnSessionStart",
"serverReadyAction": {
"action": "openExternally",
"pattern": "Now listening on",
"uriFormat": "http://localhost:5000"
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development",
"ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.SpaProxy"
}
},
{
"name": "MyProject.Api Launch",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "Build",
"program": "${workspaceFolder}/src/templates/MyProject.Api/bin/Debug/net7.0/MyProject.Api.dll",
"cwd": "${workspaceFolder}/src/templates/MyProject.Api/bin/Debug/net7.0/",
"program": "${workspaceFolder}/src/templates/MyProject.Api/bin/Debug/net8.0/MyProject.Api.dll",
"cwd": "${workspaceFolder}/src/templates/MyProject.Api/bin/Debug/net8.0/",
"internalConsoleOptions": "openOnSessionStart",
"serverReadyAction": {
"action": "openExternally",
Expand All @@ -40,8 +58,8 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "Build",
"program": "${workspaceFolder}/src/templates/MyProject.Minimal/bin/Debug/net7.0/MyProject.Minimal.dll",
"cwd": "${workspaceFolder}/src/templates/MyProject.Minimal/bin/Debug/net7.0/",
"program": "${workspaceFolder}/src/templates/MyProject.Minimal/bin/Debug/net8.0/MyProject.Minimal.dll",
"cwd": "${workspaceFolder}/src/templates/MyProject.Minimal/bin/Debug/net8.0/",
"internalConsoleOptions": "openOnSessionStart",
"serverReadyAction": {
"action": "openExternally",
Expand All @@ -57,8 +75,8 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "Build",
"program": "${workspaceFolder}/src/templates/MyProject.SchedulerApi/bin/Debug/net7.0/MyProject.SchedulerApi.dll",
"cwd": "${workspaceFolder}/src/templates/MyProject.SchedulerApi/bin/Debug/net7.0/",
"program": "${workspaceFolder}/src/templates/MyProject.SchedulerApi/bin/Debug/net8.0/MyProject.SchedulerApi.dll",
"cwd": "${workspaceFolder}/src/templates/MyProject.SchedulerApi/bin/Debug/net8.0/",
"internalConsoleOptions": "openOnSessionStart",
"serverReadyAction": {
"action": "openExternally",
Expand Down
9 changes: 8 additions & 1 deletion src/templates/MyProject.Angular/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
using System.Text.Json;
using Simplify.Web;
using Simplify.Web.Responses;

Json.DefaultOptions = new JsonSerializerOptions
{
PropertyNamingPolicy = JsonNamingPolicy.CamelCase
};

var builder = WebApplication.CreateBuilder(args);

Expand All @@ -25,7 +32,7 @@
app.UseSpaStaticFiles();
}

app.UseSimplifyWebNonTerminal();
app.UseSimplifyWebNonTerminal(true);

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

0 comments on commit c5c10af

Please sign in to comment.