File tree 3 files changed +7
-3
lines changed
3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ import { Injectable } from '@angular/core';
2
2
import { BehaviorSubject } from 'rxjs' ;
3
3
import { io } from "socket.io-client" ;
4
4
5
+ import { environment } from '../../../environments/environment' ;
6
+
5
7
@Injectable ( {
6
8
providedIn : 'root'
7
9
} )
@@ -13,7 +15,7 @@ export class BingoService {
13
15
14
16
constructor ( ) { }
15
17
16
- socket = io ( 'http://localhost:3000' ) ;
18
+ socket = io ( environment . server ) ;
17
19
18
20
public sendMessage ( message : String ) {
19
21
this . socket . emit ( 'message' , message ) ;
Original file line number Diff line number Diff line change 1
1
export const environment = {
2
- production : true
2
+ production : true ,
3
+ server : 'https://nodejs-bingo.herokuapp.com'
3
4
} ;
Original file line number Diff line number Diff line change 3
3
// The list of file replacements can be found in `angular.json`.
4
4
5
5
export const environment = {
6
- production : false
6
+ production : false ,
7
+ server : 'http://localhost:3000'
7
8
} ;
8
9
9
10
/*
You can’t perform that action at this time.
0 commit comments