Organize workspace: Frontend, Backend, and Tests in one repo
This commit is contained in:
26
.vscode-server/data/User/History/-6061d294/uV5H.cs
Normal file
26
.vscode-server/data/User/History/-6061d294/uV5H.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using Seasoned.Backend.Services;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
builder.Services.AddScoped<IRecipeService, RecipeService>();
|
||||
|
||||
builder.Services.AddControllers();
|
||||
builder.Services.AddOpenApi();
|
||||
|
||||
builder.Services.AddCors(options =>
|
||||
{
|
||||
options.AddDefaultPolicy(policy =>
|
||||
{
|
||||
policy.AllowAnyOrigin().AllowAnyHeader().AllowAnyMethod();
|
||||
});
|
||||
});
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
if (app.Environment.IsDevelopment())
|
||||
{
|
||||
app.MapOpenApi();
|
||||
}
|
||||
|
||||
app.MapControllers();
|
||||
app.Run();
|
||||
Reference in New Issue
Block a user