sdk_client/src/index.ts
2024-04-09 13:25:20 +02:00

21 lines
536 B
TypeScript

import Services from './services';
import { WebSocketClient } from './websockets';
const wsurl = "ws://192.168.1.44:8090";
document.addEventListener('DOMContentLoaded', async () => {
try {
const services = await Services.getInstance();
await services.addWebsocketConnection(wsurl);
if ((await services.isNewUser())) {
await services.displayCreateId();
}
else {
await services.displayRecover()
}
} catch (error) {
console.error(error);
}
});