forked from ddrilling/asb_cloud_front
websocket development config
This commit is contained in:
parent
98c26132d2
commit
90801ff31b
@ -12,14 +12,19 @@ type ConnectionsDict = {
|
|||||||
[route: string]: HubConnection;
|
[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 = {
|
const Connections: ConnectionsDict = {
|
||||||
'hubs/telemetry': new HubConnectionBuilder()
|
'hubs/telemetry': new HubConnectionBuilder()
|
||||||
.withUrl(`http://192.168.1.70:5000/hubs/telemetry`, ConnectionOptions)//
|
.withUrl(`${baseUrl}/hubs/telemetry`, ConnectionOptions)//
|
||||||
.withAutomaticReconnect()
|
.withAutomaticReconnect()
|
||||||
.build(),
|
.build(),
|
||||||
|
|
||||||
'hubs/reports': new HubConnectionBuilder()
|
'hubs/reports': new HubConnectionBuilder()
|
||||||
.withUrl(`http://192.168.1.70:5000/hubs/reports`, ConnectionOptions)
|
.withUrl(`${baseUrl}/hubs/reports`, ConnectionOptions)
|
||||||
.withAutomaticReconnect()
|
.withAutomaticReconnect()
|
||||||
.build()
|
.build()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user