Skip to content

Commit 7aaafdb

Browse files
committed
refactroring
1 parent fdfb6ec commit 7aaafdb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

web/src/views/Home.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ export default {
2929
},
3030
},
3131
created() {
32+
var backend = import.meta.env.VITE_APP_BACKEND
3233
this.store.getAllMessages()
33-
this.connection = new WebSocket("ws://localhost:8000/api/v1/ws/netclients")
34+
this.connection = new WebSocket(`ws://${backend}/api/v1/ws/netclients`)
3435
this.connection.onmessage = function (event) {
3536
if (event.data == this.cache) { // если не было новых сообщений и пришло тоже самое
3637
return

0 commit comments

Comments
 (0)