This commit is contained in:
Tommy Parnell
2021-12-28 17:25:32 -05:00
parent 0ee3ee8bff
commit 585438abc6
3 changed files with 12 additions and 5 deletions

1
.gitignore vendored
View File

@@ -452,5 +452,4 @@ $RECYCLE.BIN/
!.vscode/tasks.json !.vscode/tasks.json
!.vscode/launch.json !.vscode/launch.json
!.vscode/extensions.json !.vscode/extensions.json
Properties Properties

View File

@@ -1,6 +1,10 @@
var builder = WebApplication.CreateBuilder(args); var builder = WebApplication.CreateBuilder(args);
var app = builder.Build(); var app = builder.Build();
app.MapGet("/", () => "Hello World!");
var port = Environment.GetEnvironmentVariable("PORT") ?? "3100"; app.MapGet("/", () =>
app.Run("http://0.0.0.0:" + port); {
return "Hello World";
});
app.Run();

View File

@@ -4,7 +4,11 @@
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>dotnet_mvc_test</RootNamespace> <RootNamespace>dotnet_mvc_test_2</RootNamespace>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
</ItemGroup>
</Project> </Project>