Initial .NET API service
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
var app = builder.Build();
|
||||
|
||||
var rootPath = Environment.GetEnvironmentVariable("ROOT_PATH");
|
||||
if (!string.IsNullOrWhiteSpace(rootPath))
|
||||
{
|
||||
app.UsePathBase(rootPath);
|
||||
}
|
||||
|
||||
app.MapGet("/", () => Results.Json(new
|
||||
{
|
||||
name = "csob",
|
||||
service = "csob",
|
||||
status = "ok"
|
||||
}));
|
||||
|
||||
app.MapGet("/health", () => Results.Json(new
|
||||
{
|
||||
status = "ok"
|
||||
}));
|
||||
|
||||
app.Run();
|
||||
Reference in New Issue
Block a user