Ask for an example of using scocket.io in VUE.JS.

recent applications use scocket.io
applications do not use vue-cli
use vue.js files directly.
can"t find a solution after searching for a long time

Mar.03,2021

insert

after your page body
<script src="https://cdn.socket.io/socket.io-1.0.0.js"></script>

then normal socketio usage,

var socket = io('http://localhost');
    socket.on('connect', function(){
    socket.on('event', function(data){});
    socket.on('disconnect', function(){});
Menu