añade inicio del back

This commit is contained in:
2025-08-07 13:36:31 +02:00
parent dc68641cfe
commit 9b373d1929
83 changed files with 63060 additions and 1 deletions

View File

@@ -0,0 +1,36 @@
using Microsoft.EntityFrameworkCore;
internal class Program
{
private static void Main(string[] args)
{
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddDbContext<back.ApiService.context.PhotoContext>(options => options.UseSqlite("Data Source=photos.db"));
builder.Services.AddControllers();
// Add service defaults & Aspire client integrations.
builder.AddServiceDefaults();
// Add services to the container.
builder.Services.AddProblemDetails();
// Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi
builder.Services.AddOpenApi();
var app = builder.Build();
// Configure the HTTP request pipeline.
app.UseExceptionHandler();
if (app.Environment.IsDevelopment())
{
app.MapOpenApi();
}
app.MapControllers();
app.Run();
}
}