This commit is contained in:
KharchenkoVV 2021-07-26 17:30:09 +05:00
commit 989e03840a

View File

@ -12,14 +12,19 @@ type ConnectionsDict = {
[route: string]: HubConnection;
};
//var baseUrl = `http://192.168.1.70:5000`
var baseUrl = process.env.NODE_ENV === 'development'
?'http://192.168.1.70:5000'
:''
const Connections: ConnectionsDict = {
'hubs/telemetry': new HubConnectionBuilder()
.withUrl(`http://192.168.1.70:5000/hubs/telemetry`, ConnectionOptions)//
.withUrl(`${baseUrl}/hubs/telemetry`, ConnectionOptions)//
.withAutomaticReconnect()
.build(),
'hubs/reports': new HubConnectionBuilder()
.withUrl(`http://192.168.1.70:5000/hubs/reports`, ConnectionOptions)
.withUrl(`${baseUrl}/hubs/reports`, ConnectionOptions)
.withAutomaticReconnect()
.build()
}