Browse Source

Fix start script port

unoptim
GreatBearShark 2 years ago
parent
commit
050ba93745
  1. 2
      package.json
  2. 4
      src/env.ts

2
package.json

@ -11,7 +11,7 @@
"lint": "tsc --noEmit && eslint --report-unused-disable-directives --ext .js,.ts,.tsx src",
"prebuild": "node generate_translations.js",
"prestart": "node generate_translations.js",
"start": "node generate_translations.js && EXTEND_ESLINT=true TSC_COMPILE_ON_ERROR=true react-scripts start",
"start": "node generate_translations.js && EXTEND_ESLINT=true TSC_COMPILE_ON_ERROR=true PORT=4444 react-scripts start",
"start_old": "node fuse dev"
},
"keywords": [],

4
src/env.ts

@ -2,10 +2,10 @@ const host = `${window.location.hostname}`;
const port = `${
window.location.port == '4444' ? '8536' : window.location.port
}`;
// const endpoint = `${host}:${port}`;
const endpoint = `${host}:${port}`;
// for testing against prod endpoint
const endpoint = 'www.chapo.chat';
// const endpoint = 'www.chapo.chat';
export const wsUri = `${
window.location.protocol == 'https:' ? 'wss://' : 'ws://'

Loading…
Cancel
Save