diff --git a/Proculite.GpioRest/Controllers/BasicController.cs b/Proculite.GpioRest/Controllers/BasicController.cs new file mode 100644 index 0000000..a9f5df0 --- /dev/null +++ b/Proculite.GpioRest/Controllers/BasicController.cs @@ -0,0 +1,13 @@ +using Microsoft.AspNetCore.Mvc; + +namespace Proculite.GpioRest.Controllers +{ + public class BasicController : Controller + { + [HttpGet("/ping")] + public IActionResult Ping() + { + return Ok("Pong"); + } + } +} \ No newline at end of file diff --git a/Proculite.GpioRest/Program.cs b/Proculite.GpioRest/Program.cs index 4ff38cb..098de00 100644 --- a/Proculite.GpioRest/Program.cs +++ b/Proculite.GpioRest/Program.cs @@ -4,9 +4,11 @@ var builder = WebApplication.CreateBuilder(args); // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle builder.Services.AddEndpointsApiExplorer(); builder.Services.AddSwaggerGen(); +builder.Services.AddControllers(); var app = builder.Build(); +app.MapControllers(); app.UseSwagger(); app.UseSwaggerUI();