commit
616bbaf5eb
6 changed files with 117 additions and 1 deletions
@ -0,0 +1,17 @@ |
|||||||
|
<Project Sdk="Microsoft.NET.Sdk.Web"> |
||||||
|
|
||||||
|
<PropertyGroup> |
||||||
|
<TargetFramework>net8.0</TargetFramework> |
||||||
|
<Nullable>enable</Nullable> |
||||||
|
<ImplicitUsings>enable</ImplicitUsings> |
||||||
|
</PropertyGroup> |
||||||
|
|
||||||
|
<ItemGroup> |
||||||
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" /> |
||||||
|
</ItemGroup> |
||||||
|
|
||||||
|
<ItemGroup> |
||||||
|
<Folder Include="Controllers\" /> |
||||||
|
</ItemGroup> |
||||||
|
|
||||||
|
</Project> |
||||||
@ -0,0 +1,6 @@ |
|||||||
|
@ParkingLotService.API_HostAddress = http://localhost:5148 |
||||||
|
|
||||||
|
GET {{ParkingLotService.API_HostAddress}}/weatherforecast/ |
||||||
|
Accept: application/json |
||||||
|
|
||||||
|
### |
||||||
@ -0,0 +1,36 @@ |
|||||||
|
|
||||||
|
namespace ParkingLotService.API |
||||||
|
{ |
||||||
|
public class Program |
||||||
|
{ |
||||||
|
public static void Main(string[] args) |
||||||
|
{ |
||||||
|
var builder = WebApplication.CreateBuilder(args); |
||||||
|
|
||||||
|
// Add services to the container. |
||||||
|
|
||||||
|
builder.Services.AddControllers(); |
||||||
|
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle |
||||||
|
builder.Services.AddEndpointsApiExplorer(); |
||||||
|
builder.Services.AddSwaggerGen(); |
||||||
|
|
||||||
|
var app = builder.Build(); |
||||||
|
|
||||||
|
// Configure the HTTP request pipeline. |
||||||
|
if (app.Environment.IsDevelopment()) |
||||||
|
{ |
||||||
|
app.UseSwagger(); |
||||||
|
app.UseSwaggerUI(); |
||||||
|
} |
||||||
|
|
||||||
|
app.UseHttpsRedirection(); |
||||||
|
|
||||||
|
app.UseAuthorization(); |
||||||
|
|
||||||
|
|
||||||
|
app.MapControllers(); |
||||||
|
|
||||||
|
app.Run(); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,9 @@ |
|||||||
|
{ |
||||||
|
"Logging": { |
||||||
|
"LogLevel": { |
||||||
|
"Default": "Information", |
||||||
|
"Microsoft.AspNetCore": "Warning" |
||||||
|
} |
||||||
|
}, |
||||||
|
"AllowedHosts": "*" |
||||||
|
} |
||||||
Loading…
Reference in new issue