url sp_adress + wsurl + server config
This commit is contained in:
parent
d07f9ce7c3
commit
fe672fce1d
@ -1,7 +1,8 @@
|
||||
import Services from './services/service';
|
||||
// import { WebSocketClient } from './websockets';
|
||||
|
||||
const wsurl = `ws://74.234.68.175:8091`;
|
||||
// const wsurl = `ws://74.234.68.175:8091`;
|
||||
const wsurl = `wss://localhost/ws/`;
|
||||
document.addEventListener('DOMContentLoaded', async () => {
|
||||
try {
|
||||
|
||||
|
@ -76,7 +76,8 @@ export default class Services {
|
||||
console.log("🚀 ~ Services ~ generateQRCode= ~ text:", text)
|
||||
try {
|
||||
const container = document.getElementById('containerId');
|
||||
const url = await QRCode.toDataURL(text);
|
||||
const currentUrl = window.location.href;
|
||||
const url = await QRCode.toDataURL(currentUrl + "?sp_address=" + text);
|
||||
const qrCode = container?.querySelector('.qr-code img');
|
||||
qrCode?.setAttribute('src', url)
|
||||
} catch (err) {
|
||||
|
@ -34,7 +34,13 @@ export default defineConfig({
|
||||
extensions: ['.ts', '.tsx', '.js'],
|
||||
},
|
||||
server: {
|
||||
host: 'localhost',
|
||||
open: false,
|
||||
port: 3001,
|
||||
strictPort: true, // Empêche de changer de port si le 3001 est occupé
|
||||
hmr: {
|
||||
port: 9050, // Assure que le WebSocket HMR utilise bien le même port
|
||||
protocol: 'wss',
|
||||
}
|
||||
},
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user