homegames-common 0.3.2 → 0.9.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +10 -5
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -17,6 +17,7 @@ const getUserHash = (username) => {
|
|
|
17
17
|
|
|
18
18
|
const DEFAULT_CONFIG = {
|
|
19
19
|
"LINK_ENABLED": true,
|
|
20
|
+
"HTTPS_ENABLED": true,
|
|
20
21
|
"HOMENAMES_PORT": 7400,
|
|
21
22
|
"HOME_PORT": 9801,
|
|
22
23
|
"LOG_LEVEL": "INFO",
|
|
@@ -25,11 +26,10 @@ const DEFAULT_CONFIG = {
|
|
|
25
26
|
"IS_DEMO": false,
|
|
26
27
|
"BEZEL_SIZE_Y": 15,
|
|
27
28
|
"BEZEL_SIZE_X": 15,
|
|
29
|
+
"PUBLIC_GAMES": true,
|
|
28
30
|
"DOWNLOADED_GAME_DIRECTORY": "hg-games",
|
|
29
|
-
"LOG_PATH": "hg_log.txt"
|
|
30
|
-
|
|
31
|
-
"PUBLIC_GAMES": false
|
|
32
|
-
};
|
|
31
|
+
"LOG_PATH": "hg_log.txt"
|
|
32
|
+
}
|
|
33
33
|
|
|
34
34
|
const getLocalIP = () => {
|
|
35
35
|
const ifaces = os.networkInterfaces();
|
|
@@ -446,7 +446,7 @@ const guaranteeCerts = (authPath, certPath) => new Promise((resolve, reject) =>
|
|
|
446
446
|
const linkInit = (authPath) => new Promise((resolve, reject) => {
|
|
447
447
|
|
|
448
448
|
getLoginInfo(authPath).then((loginInfo) => {
|
|
449
|
-
const client = new WebSocket('wss://
|
|
449
|
+
const client = new WebSocket('wss://homegames.link:7080');
|
|
450
450
|
|
|
451
451
|
client.on('open', () => {
|
|
452
452
|
console.log('opened connection to link');
|
|
@@ -456,6 +456,11 @@ const linkInit = (authPath) => new Promise((resolve, reject) => {
|
|
|
456
456
|
accessToken: loginInfo.tokens.accessToken
|
|
457
457
|
}));
|
|
458
458
|
});
|
|
459
|
+
|
|
460
|
+
client.on('error', (err) => {
|
|
461
|
+
console.log('some error happened');
|
|
462
|
+
console.log(err);
|
|
463
|
+
});
|
|
459
464
|
});
|
|
460
465
|
|
|
461
466
|
});
|