mirror of
https://github.com/MetinSeylan/Vue-Socket.io.git
synced 2025-04-16 15:21:28 +02:00
you can replace default path /socket.io with yours
config like: Vue.use(VueSocketio, {url: 'http://localhost:3000', path: '/your_path'}); and you can set namespace the sametime: Vue.use(VueSocketio, {url: 'http://localhost:3000/namespace', path: '/your_path'}); all these above will create the connect like: ws://localhost:3000/your_path/...
This commit is contained in:
parent
57887ea0a1
commit
e70b692373
1 changed files with 2 additions and 0 deletions
|
@ -7,6 +7,8 @@ export default class{
|
||||||
|
|
||||||
if(typeof connection == 'string'){
|
if(typeof connection == 'string'){
|
||||||
this.Socket = Socket(connection);
|
this.Socket = Socket(connection);
|
||||||
|
}else if(connection.url){
|
||||||
|
this.Socket = Socket(connection.url, {path: connection.path ? connection.path : '/socket.io'});
|
||||||
}else{
|
}else{
|
||||||
this.Socket = connection
|
this.Socket = connection
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue