mirror of
https://github.com/mempool/mempool.git
synced 2025-03-13 11:36:07 +01:00
Proxy websocket when running local environment.
This commit is contained in:
parent
e95b90b857
commit
53269a805b
3 changed files with 9 additions and 4 deletions
|
@ -50,8 +50,8 @@ class MempoolSpace {
|
|||
statistics.startStatistics();
|
||||
fiatConversion.startService();
|
||||
|
||||
let opts = {
|
||||
host: "127.0.0.1",
|
||||
const opts = {
|
||||
host: '127.0.0.1',
|
||||
port: 8999
|
||||
};
|
||||
this.server.listen(opts, () => {
|
||||
|
|
|
@ -2,5 +2,10 @@
|
|||
"/api": {
|
||||
"target": "http://localhost:8999/",
|
||||
"secure": false
|
||||
},
|
||||
"/ws": {
|
||||
"target": "http://localhost:8999/",
|
||||
"secure": false,
|
||||
"ws": true
|
||||
}
|
||||
}
|
|
@ -6,8 +6,8 @@ import { Observable } from 'rxjs';
|
|||
import { MemPoolService } from './mem-pool.service';
|
||||
import { tap, retryWhen, delay } from 'rxjs/operators';
|
||||
|
||||
const WEB_SOCKET_PROTOCOL = (document.location.protocol == 'https:') ? 'wss:' : 'ws:';
|
||||
const WEB_SOCKET_URL = WEB_SOCKET_PROTOCOL + '//' + document.location.hostname + '/ws';
|
||||
const WEB_SOCKET_PROTOCOL = (document.location.protocol === 'https:') ? 'wss:' : 'ws:';
|
||||
const WEB_SOCKET_URL = WEB_SOCKET_PROTOCOL + '//' + document.location.hostname + ':' + document.location.port + '/ws';
|
||||
const API_BASE_URL = '/api/v1';
|
||||
|
||||
@Injectable({
|
||||
|
|
Loading…
Add table
Reference in a new issue