我有一个使用SignalR的.NET Core 2.1 Web应用程序。我需要将HubUrl传递到自定义的JavaScript文件中。在.NET Core中是否可能实现这个?
以下是JavaScript代码示例:
以下是JavaScript代码示例:
const connection = new signalR.HubConnectionBuilder()
.withUrl('http://localhost:5000/hub') //Here I need to read appSettings.json to get value from there
.configureLogging(signalR.LogLevel.Information)
.build();