Dynamic domain

This commit is contained in:
Bruno SIMON
2016-06-07 14:17:20 +02:00
parent 6e32b80ddd
commit 1126da2747
10 changed files with 31 additions and 16 deletions
+4 -3
View File
@@ -1,8 +1,9 @@
angular_module.factory(
application.factory(
'project',
[
'config',
'$timeout',
function( $timeout )
function( config, $timeout )
{
var update_callback = null;
@@ -85,7 +86,7 @@ angular_module.factory(
result.connect = function( project_name )
{
// Connect to socket
var socket = io( 'http://192.168.1.4:3000/project/' + project_name );
var socket = io( config.domain + '/project/' + project_name );
// Connect event
socket.on( 'connect', function()