Merged PR 211: Add csharp classes to SVGLayoutDesigner and add tests
This commit is contained in:
parent
24e47ae240
commit
f74af69291
40 changed files with 1346 additions and 13 deletions
37
csharp/SVGLDLibs/SVGLDWebAPI/Program.cs
Normal file
37
csharp/SVGLDLibs/SVGLDWebAPI/Program.cs
Normal file
|
@ -0,0 +1,37 @@
|
|||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add services to the container.
|
||||
|
||||
builder.Services.AddControllers();
|
||||
|
||||
const string allowOrigin = "allowOrigin";
|
||||
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
||||
builder.Services.AddCors(options =>
|
||||
{
|
||||
options.AddPolicy(name: allowOrigin,
|
||||
policy =>
|
||||
{
|
||||
policy.WithOrigins("http://localhost:3000");
|
||||
});
|
||||
});
|
||||
builder.Services.AddEndpointsApiExplorer();
|
||||
builder.Services.AddSwaggerGen();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
if (app.Environment.IsDevelopment())
|
||||
{
|
||||
app.UseSwagger();
|
||||
app.UseSwaggerUI();
|
||||
}
|
||||
|
||||
app.UseCors(allowOrigin);
|
||||
|
||||
// app.UseHttpsRedirection();
|
||||
|
||||
app.UseAuthorization();
|
||||
|
||||
app.MapControllers();
|
||||
|
||||
app.Run();
|
Loading…
Add table
Add a link
Reference in a new issue