diff --git a/package.json b/package.json index ed3c7b3..2f6c391 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "test": "echo \"Error: no test specified\" && exit 1", "build_wasm": "wasm-pack build --out-dir ../../dist/pkg ./crates/sp_client --target bundler --dev", "start": "webpack serve", - "build": "webpack" + "build": "webpack", + "deploy": "sudo cp -r dist/* /var/www/html/" }, "keywords": [], "author": "", diff --git a/src/index.ts b/src/index.ts index d379dd8..834bd9d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,7 +1,7 @@ import Services from './services'; import { WebSocketClient } from './websockets'; -const wsurl = "ws://localhost:8090"; +const wsurl = `wss://${window.location.hostname}/ws/`; document.addEventListener('DOMContentLoaded', async () => { try { const services = await Services.getInstance();