parent
e0a2f47c65
commit
1ef62fbedb
@ -0,0 +1,8 @@ |
||||
<Project Sdk="Microsoft.NET.Sdk.Web"> |
||||
|
||||
<PropertyGroup> |
||||
<TargetFramework>netcoreapp3.1</TargetFramework> |
||||
</PropertyGroup> |
||||
|
||||
|
||||
</Project> |
@ -0,0 +1,26 @@ |
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.Linq; |
||||
using System.Threading.Tasks; |
||||
using Microsoft.AspNetCore.Hosting; |
||||
using Microsoft.Extensions.Configuration; |
||||
using Microsoft.Extensions.Hosting; |
||||
using Microsoft.Extensions.Logging; |
||||
|
||||
namespace EPAServeur |
||||
{ |
||||
public class Program |
||||
{ |
||||
public static void Main(string[] args) |
||||
{ |
||||
CreateHostBuilder(args).Build().Run(); |
||||
} |
||||
|
||||
public static IHostBuilder CreateHostBuilder(string[] args) => |
||||
Host.CreateDefaultBuilder(args) |
||||
.ConfigureWebHostDefaults(webBuilder => |
||||
{ |
||||
webBuilder.UseStartup<Startup>(); |
||||
}); |
||||
} |
||||
} |
@ -0,0 +1,51 @@ |
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.Linq; |
||||
using System.Threading.Tasks; |
||||
using Microsoft.AspNetCore.Builder; |
||||
using Microsoft.AspNetCore.Hosting; |
||||
using Microsoft.AspNetCore.HttpsPolicy; |
||||
using Microsoft.AspNetCore.Mvc; |
||||
using Microsoft.Extensions.Configuration; |
||||
using Microsoft.Extensions.DependencyInjection; |
||||
using Microsoft.Extensions.Hosting; |
||||
using Microsoft.Extensions.Logging; |
||||
|
||||
namespace EPAServeur |
||||
{ |
||||
public class Startup |
||||
{ |
||||
public Startup(IConfiguration configuration) |
||||
{ |
||||
Configuration = configuration; |
||||
} |
||||
|
||||
public IConfiguration Configuration { get; } |
||||
|
||||
// This method gets called by the runtime. Use this method to add services to the container. |
||||
public void ConfigureServices(IServiceCollection services) |
||||
{ |
||||
services.AddControllers(); |
||||
} |
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. |
||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env) |
||||
{ |
||||
if (env.IsDevelopment()) |
||||
{ |
||||
app.UseDeveloperExceptionPage(); |
||||
} |
||||
|
||||
app.UseHttpsRedirection(); |
||||
|
||||
app.UseRouting(); |
||||
|
||||
app.UseAuthorization(); |
||||
|
||||
app.UseEndpoints(endpoints => |
||||
{ |
||||
endpoints.MapControllers(); |
||||
}); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,15 @@ |
||||
using System; |
||||
|
||||
namespace EPAServeur |
||||
{ |
||||
public class WeatherForecast |
||||
{ |
||||
public DateTime Date { get; set; } |
||||
|
||||
public int TemperatureC { get; set; } |
||||
|
||||
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); |
||||
|
||||
public string Summary { get; set; } |
||||
} |
||||
} |
@ -0,0 +1,9 @@ |
||||
{ |
||||
"Logging": { |
||||
"LogLevel": { |
||||
"Default": "Information", |
||||
"Microsoft": "Warning", |
||||
"Microsoft.Hosting.Lifetime": "Information" |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,10 @@ |
||||
{ |
||||
"Logging": { |
||||
"LogLevel": { |
||||
"Default": "Information", |
||||
"Microsoft": "Warning", |
||||
"Microsoft.Hosting.Lifetime": "Information" |
||||
} |
||||
}, |
||||
"AllowedHosts": "*" |
||||
} |
Loading…
Reference in new issue