You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
307 B
10 lines
307 B
2 years ago
|
'use strict';
|
||
|
|
||
|
function socketConnect(project, name = "noone"){
|
||
|
let urlQueries = '?game=' + project.name + '&name=' + name;
|
||
|
let port = 3000;
|
||
|
let url = location.hostname + ":" + port + urlQueries;
|
||
|
|
||
|
socket = io.connect(url);
|
||
|
socket.on('connect', () => console.log('Connected to ', url));
|
||
|
}
|