Removed Journal.API project
This commit is contained in:
parent
ef22683b70
commit
c0df009d1a
@ -1,17 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net10.0</TargetFramework>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.0.3" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\Journal.Core\Journal.Core.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
@Journal.Api_HostAddress = http://localhost:5014
|
|
||||||
|
|
||||||
GET {{Journal.Api_HostAddress}}/health
|
|
||||||
Accept: application/json
|
|
||||||
|
|
||||||
###
|
|
||||||
|
|
||||||
POST {{Journal.Api_HostAddress}}/api/command
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"action": "config.get",
|
|
||||||
"payload": {}
|
|
||||||
}
|
|
||||||
|
|
||||||
###
|
|
||||||
|
|
||||||
POST {{Journal.Api_HostAddress}}/api/command
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"action":
|
|
||||||
|
|
||||||
###
|
|
||||||
@ -1,29 +0,0 @@
|
|||||||
using System.Text.Json;
|
|
||||||
using Journal.Core;
|
|
||||||
|
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
|
||||||
builder.Services.AddOpenApi();
|
|
||||||
builder.Services.AddFragmentServices();
|
|
||||||
builder.Services.AddSingleton<Entry>();
|
|
||||||
|
|
||||||
var app = builder.Build();
|
|
||||||
|
|
||||||
if (app.Environment.IsDevelopment())
|
|
||||||
app.MapOpenApi();
|
|
||||||
|
|
||||||
app.MapGet("/health", () => Results.Json(new { ok = true, data = "healthy" }));
|
|
||||||
app.MapGet("/healthz", () => Results.Json(new { ok = true, data = "healthy" }));
|
|
||||||
app.MapGet("/api/health", () => Results.Json(new { ok = true, data = "healthy" }));
|
|
||||||
|
|
||||||
// Mirrors sidecar transport semantics over HTTP.
|
|
||||||
// request body is passed directly to Entry.HandleCommandAsync so malformed JSON
|
|
||||||
// and payload errors return the same {ok:false,error} envelope as sidecar mode.
|
|
||||||
app.MapPost("/api/command", async (HttpRequest request, Entry entry) =>
|
|
||||||
{
|
|
||||||
using var reader = new StreamReader(request.Body);
|
|
||||||
var body = await reader.ReadToEndAsync();
|
|
||||||
var response = await entry.HandleCommandAsync(body);
|
|
||||||
return Results.Content(response, "application/json");
|
|
||||||
});
|
|
||||||
|
|
||||||
app.Run();
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "https://json.schemastore.org/launchsettings.json",
|
|
||||||
"profiles": {
|
|
||||||
"http": {
|
|
||||||
"commandName": "Project",
|
|
||||||
"dotnetRunMessages": true,
|
|
||||||
"launchBrowser": false,
|
|
||||||
"applicationUrl": "http://localhost:5014",
|
|
||||||
"environmentVariables": {
|
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"https": {
|
|
||||||
"commandName": "Project",
|
|
||||||
"dotnetRunMessages": true,
|
|
||||||
"launchBrowser": false,
|
|
||||||
"applicationUrl": "https://localhost:7086;http://localhost:5014",
|
|
||||||
"environmentVariables": {
|
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
"Logging": {
|
|
||||||
"LogLevel": {
|
|
||||||
"Default": "Information",
|
|
||||||
"Microsoft.AspNetCore": "Warning"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"Logging": {
|
|
||||||
"LogLevel": {
|
|
||||||
"Default": "Information",
|
|
||||||
"Microsoft.AspNetCore": "Warning"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"AllowedHosts": "*"
|
|
||||||
}
|
|
||||||
@ -1,5 +1,4 @@
|
|||||||
<Solution>
|
<Solution>
|
||||||
<Project Path="Journal.Api/Journal.Api.csproj" />
|
|
||||||
<Project Path="Journal.Core/Journal.Core.csproj" />
|
<Project Path="Journal.Core/Journal.Core.csproj" />
|
||||||
<Project Path="Journal.Sidecar/Journal.Sidecar.csproj" />
|
<Project Path="Journal.Sidecar/Journal.Sidecar.csproj" />
|
||||||
<Project Path="Journal.SmokeTests/Journal.SmokeTests.csproj" />
|
<Project Path="Journal.SmokeTests/Journal.SmokeTests.csproj" />
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user