mirror of https://github.com/ivanch/tcc.git
29 lines
666 B
C#
29 lines
666 B
C#
|
using Microsoft.AspNetCore.Server.Kestrel.Core;
|
||
|
using TCC.Services;
|
||
|
|
||
|
namespace TCC
|
||
|
{
|
||
|
public class Program
|
||
|
{
|
||
|
public static void Main(string[] args)
|
||
|
{
|
||
|
var builder = WebApplication.CreateBuilder(args);
|
||
|
|
||
|
builder.Services.AddScoped<ImageService>();
|
||
|
|
||
|
builder.Services.AddControllers();
|
||
|
|
||
|
builder.Services.Configure<KestrelServerOptions>(options =>
|
||
|
{
|
||
|
options.Limits.MaxRequestBodySize = int.MaxValue; // if don't set default value is: 30 MB
|
||
|
});
|
||
|
|
||
|
|
||
|
var app = builder.Build();
|
||
|
|
||
|
app.MapControllers();
|
||
|
|
||
|
app.Run();
|
||
|
}
|
||
|
}
|
||
|
}
|