File tree 1 file changed +5
-11
lines changed
1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -104,17 +104,11 @@ var port = process.env.VCAP_APP_PORT || 8081;
104
104
var connected = function ( ) {
105
105
console . log ( "CDS Labs Metrics Collector Microservice started on port %s : %s" , port , Date ( Date . now ( ) ) ) ;
106
106
} ;
107
- var url = null ;
108
-
109
- if ( process . env . VCAP_APP_HOST ) {
110
- http . listen ( process . env . VCAP_APP_PORT ,
111
- process . env . VCAP_APP_HOST ,
112
- connected ) ;
113
- url = appEnv . url + '/tracker' ;
114
- } else {
115
- http . listen ( port , connected ) ;
116
- url = 'http://localhost:' + port + '/tracker' ;
117
- }
107
+ var url = appEnv . url + "/tracker" ;
108
+
109
+ http . listen ( appEnv . port , ( appEnv . bind == "localhost" ? null : appEnv . bind ) , ( ) => {
110
+ console . log ( `CDS Labs Metrics Collector Microservice listening on ${ appEnv . url } ` ) ;
111
+ } ) ;
118
112
119
113
// if we detect etcd
120
114
if ( process . env . ETCD_URL ) {
You can’t perform that action at this time.
0 commit comments