Removed Journal.API project

This commit is contained in:
Jacob Schmidt 2026-02-24 20:40:32 -06:00
parent ef22683b70
commit c0df009d1a
7 changed files with 0 additions and 111 deletions

View File

@ -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>

View File

@ -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":
###

View File

@ -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();

View File

@ -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"
}
}
}
}

View File

@ -1,8 +0,0 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}

View File

@ -1,9 +0,0 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}

View File

@ -1,5 +1,4 @@
<Solution>
<Project Path="Journal.Api/Journal.Api.csproj" />
<Project Path="Journal.Core/Journal.Core.csproj" />
<Project Path="Journal.Sidecar/Journal.Sidecar.csproj" />
<Project Path="Journal.SmokeTests/Journal.SmokeTests.csproj" />