feat(emulated-entrypoint): wire AddBattleNode + UseBattleNode into the web host
This commit is contained in:
@@ -16,6 +16,7 @@ using SVSim.EmulatedEntrypoint.Extensions;
|
||||
using SVSim.EmulatedEntrypoint.Middlewares;
|
||||
using SVSim.EmulatedEntrypoint.Security.SteamSessionAuthentication;
|
||||
using SVSim.EmulatedEntrypoint.Services;
|
||||
using SVSim.BattleNode.Hosting;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint;
|
||||
|
||||
@@ -116,6 +117,12 @@ public class Program
|
||||
|
||||
#endregion
|
||||
|
||||
builder.Services.AddBattleNode(opt =>
|
||||
{
|
||||
// ASPNETCORE_URLS defaults to http://localhost:5148; we map ws:// onto the same host:port.
|
||||
opt.NodeServerUrl = "ws://localhost:5148";
|
||||
});
|
||||
|
||||
builder.Services.AddTransient<ShadowverseTranslationMiddleware>();
|
||||
builder.Services.AddTransient<SessionidMappingMiddleware>();
|
||||
builder.Services.AddSingleton<ShadowverseSessionService>();
|
||||
@@ -163,6 +170,7 @@ public class Program
|
||||
|
||||
app.UseAuthorization();
|
||||
|
||||
app.UseBattleNode();
|
||||
|
||||
app.MapControllers();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user