增加默认启动地址配置

This commit is contained in:
falcon 2020-04-22 17:52:22 +08:00
parent b97b2ddd09
commit 937ef5590b
5 changed files with 18 additions and 4 deletions

View File

@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "3.1.3",
"commands": [
"dotnet-ef"
]
}
}
}

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile> <DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
</PropertyGroup> </PropertyGroup>
@ -10,6 +10,7 @@
<PackageReference Include="Microsoft.Extensions.Caching.Redis" Version="2.2.0" /> <PackageReference Include="Microsoft.Extensions.Caching.Redis" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="3.1.3" /> <PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="3.1.3" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="3.1.3" /> <PackageReference Include="Microsoft.Extensions.Logging" Version="3.1.3" />
<PackageReference Include="MySql.Data.EntityFrameworkCore" Version="8.0.19" />
<PackageReference Include="NLog" Version="4.7.0" /> <PackageReference Include="NLog" Version="4.7.0" />
<PackageReference Include="NLog.Web.AspNetCore" Version="4.9.1" /> <PackageReference Include="NLog.Web.AspNetCore" Version="4.9.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.3.1" /> <PackageReference Include="Swashbuckle.AspNetCore" Version="5.3.1" />

View File

@ -20,7 +20,7 @@
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
}, },
"applicationUrl": "https://localhost:5001;http://localhost:5000" "applicationUrl": "https://*:9001;http://*:9000"
} }
} }
} }

View File

@ -85,7 +85,7 @@ namespace FAuth
app.UseHsts(); app.UseHsts();
} }
using(var socpe=app.ApplicationServices.CreateScope()) { using(var socpe = app.ApplicationServices.CreateScope()) {
var db = socpe.ServiceProvider.GetService<FAuthDb>(); var db = socpe.ServiceProvider.GetService<FAuthDb>();
db.InitSync().Wait(); db.InitSync().Wait();
} }

View File

@ -16,5 +16,6 @@
}, },
"UserTicketDecryptorOption": { "UserTicketDecryptorOption": {
"Key": "abcd" "Key": "abcd"
} },
"urls": "http://*:9000,https://*:9001"
} }