forked from joamona/metatierrascol-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app-global-vars.service.ts
39 lines (37 loc) · 949 Bytes
/
app-global-vars.service.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import { Injectable } from '@angular/core';
//MODE:
// 1. Local development
// 2. Production in upvusig
// 3. Production in fff
var MODE = 1;
@Injectable({
providedIn: 'root'
})
export class AppGlobalVarsService {
apiUrl = ""
webUrl = ""
geoserverUrl = ""
constructor() {
this.setProperties()
}
private setProperties(){
switch ( MODE ) {
case 1:
this.apiUrl='http://localhost:8000/'
this.webUrl='http://localhost:4200/'
this.geoserverUrl='http://localhost:8080/geoserver/'
break;
case 2:
this.apiUrl='https://metatierrascol.upvusig.car.upv.es/api/'
this.webUrl='https://metatierrascol.upvusig.car.upv.es/'
this.geoserverUrl='https://metatierrascol.upvusig.car.upv.es/geoserver/'
break;
case 3:
// statement N
break;
default:
console.log('Mala appGlobalVarsOption');
break;
}
}
}