.NET Applications
Deploy high-performance ASP.NET Core APIs and backend services with automatic builds and scaling.
Overview
RunxBuild builds your .NET application automatically from your repository. Your service must listen on the port provided via the PORT environment variable.
Basic ASP.NET Core Template
Program.cs:
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();
// Read PORT from environment (RunxBuild requirement)
var port = Environment.GetEnvironmentVariable("PORT") ?? "8080";
app.MapGet("/", () =>
{
return Results.Json(new
{
message = "RunxBuild .NET service running"
});
});
// Important for Kubernetes
app.Urls.Add($"http://0.0.0.0:{port}");
app.Run();
RunxBuild configures your app to bind to 0.0.0.0 and the port in PORT automatically.
Deployment Settings
- Build Command: (leave empty)
- Predeploy Command: (leave empty)
- Output Directory: (leave empty)
- Start Command: (leave empty)