const PORT = process.env.PORT || 3000;

var App = angular.module('ChatRoom',['ngResource','ngRoute','ngStorage','socket.io','ngFileUpload','Controllers','Services'])
.run(["$rootScope", function ($rootScope){
	$rootScope.baseUrl = ':' + PORT; //Application URL
}]);
App.config(function ($routeProvider, $socketProvider){
	$socketProvider.setConnectionUrl(':' + PORT); // Socket URL

	$routeProvider	// AngularJS Routes
	.when('/v1/', {
		templateUrl: 'app/views/login.html',
		controller: 'loginCtrl'
	})
	.when('/v1/ChatRoom', {
		templateUrl: 'app/views/chatRoom.html',
		controller: 'chatRoomCtrl'
	})
	.otherwise({		
        redirectTo: '/v1/'	// Default Route
    });
});

@@ -32,16 +32,109 @@
 %7C 3000;%0D
+%0Aconst BUrl =  process.env.BaseUrl %7C%7C 'http://localhost';%0D%0A%0D%0Aconst FUrl = BUrl + %22:%22 + PORT;%0D
 %0A%0D%0Avar A
@@ -321,26 +321,20 @@
 seUrl = 
-':' + PORT
+FUrl
 ; //Appl
@@ -446,18 +446,12 @@
 Url(
-':' + PORT
+FUrl
 ); /

Update app.js