Prepare for release
This commit is contained in:
parent
75c98591d8
commit
7d3cb81c19
@ -64,13 +64,18 @@ app.UseForwardedHeaders(new ForwardedHeadersOptions
|
||||
ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto
|
||||
});
|
||||
|
||||
// For blazor hosting
|
||||
app.UseBlazorFrameworkFiles();
|
||||
app.UseStaticFiles();
|
||||
app.UseRouting();
|
||||
|
||||
|
||||
app.UseHttpLogging();
|
||||
app.MapControllers();
|
||||
app.MapFallbackToFile("index.html");
|
||||
app.UseCors("DevCorsPolicy");
|
||||
|
||||
app.UseWhen(context => context.Request.Path.StartsWithSegments("/sys/servlet/PowerOn", StringComparison.InvariantCulture),
|
||||
applicationBuilder => applicationBuilder.UseAllNetRequestMiddleware());
|
||||
|
||||
app.MapGet("/", () => "Hello world");
|
||||
|
||||
app.Run();
|
@ -11,6 +11,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="6.0.7" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.0-preview.7.22376.2" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.0-preview.7.22376.2" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.0-preview.7.22376.2">
|
||||
@ -44,6 +45,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SharedProject\SharedProject.csproj" />
|
||||
<ProjectReference Include="..\TaikoWebUI\TaikoWebUI.csproj"/>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
3
TaikoWebUI/.gitignore
vendored
3
TaikoWebUI/.gitignore
vendored
@ -1,2 +1 @@
|
||||
wwwroot/data/musicinfo
|
||||
wwwroot/data/wordlist
|
||||
wwwroot/data/*
|
@ -18,6 +18,10 @@ builder.Services.AddSingleton<IGameDataService, GameDataService>();
|
||||
var host = builder.Build();
|
||||
|
||||
var gameDataService = host.Services.GetRequiredService<IGameDataService>();
|
||||
#if DEBUG
|
||||
await gameDataService.InitializeAsync(builder.Configuration.GetValue<string>("DataBaseUrl"));
|
||||
#else
|
||||
await gameDataService.InitializeAsync(builder.Configuration.GetValue<string>("BaseUrl"));
|
||||
#endif
|
||||
|
||||
await host.RunAsync();
|
@ -20,8 +20,8 @@ public class GameDataService : IGameDataService
|
||||
|
||||
public async Task InitializeAsync(string dataBaseUrl)
|
||||
{
|
||||
var musicInfo = await client.GetFromJsonAsync<MusicInfo>($"{dataBaseUrl}/data/musicinfo");
|
||||
var wordList = await client.GetFromJsonAsync<WordList>($"{dataBaseUrl}/data/wordlist");
|
||||
var musicInfo = await client.GetFromJsonAsync<MusicInfo>($"{dataBaseUrl}/data/musicinfo.json");
|
||||
var wordList = await client.GetFromJsonAsync<WordList>($"{dataBaseUrl}/data/wordlist.json");
|
||||
|
||||
musicInfo.ThrowIfNull();
|
||||
wordList.ThrowIfNull();
|
||||
|
@ -20,10 +20,10 @@
|
||||
<Content Update="wwwroot\appsettings.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\musicinfo">
|
||||
<Content Update="wwwroot\data\musicinfo.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\wordlist">
|
||||
<Content Update="wwwroot\data\wordlist.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
Loading…
Reference in New Issue
Block a user