Enabled controllers.
This commit is contained in:
parent
9e9b8967d1
commit
a160a894d3
13
Proculite.GpioRest/Controllers/BasicController.cs
Normal file
13
Proculite.GpioRest/Controllers/BasicController.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
|
namespace Proculite.GpioRest.Controllers
|
||||||
|
{
|
||||||
|
public class BasicController : Controller
|
||||||
|
{
|
||||||
|
[HttpGet("/ping")]
|
||||||
|
public IActionResult Ping()
|
||||||
|
{
|
||||||
|
return Ok("Pong");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -4,9 +4,11 @@ var builder = WebApplication.CreateBuilder(args);
|
||||||
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
||||||
builder.Services.AddEndpointsApiExplorer();
|
builder.Services.AddEndpointsApiExplorer();
|
||||||
builder.Services.AddSwaggerGen();
|
builder.Services.AddSwaggerGen();
|
||||||
|
builder.Services.AddControllers();
|
||||||
|
|
||||||
var app = builder.Build();
|
var app = builder.Build();
|
||||||
|
|
||||||
|
app.MapControllers();
|
||||||
app.UseSwagger();
|
app.UseSwagger();
|
||||||
app.UseSwaggerUI();
|
app.UseSwaggerUI();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue