import io from './libs/socket.io.js';
браузер выдает ошибкумы уже почти у цели. КАКУЮ ошибку?
soket.io-client
? <script src="/socket.io/socket.io.js"></script>
<script>
var socket = io('http://localhost');
socket.on('connect', function(){});
socket.on('event', function(data){});
socket.on('disconnect', function(){});
</script>
import io from 'socket.io-client';
const socket = io('http://localhost');
<script src="<%=assetFingerprint('/javascripts/src/mapApplication.js') %>" type="module"></script>
import io from './libs/socket.js';
constructor(params) {
this.bus = eventEmitter.bus;
this.conteiner = params.conteiner;
this.size = params.size;
this.styleColor = params.styleColor;
this.io = io( 'http://searchengine.localhost');
}
<script src="http://searchengine.localhost/socket.io/socket.io.js"></script>
this.io = io('http://searchengine.localhost');
<VirtualHost *:80>
ServerName searchengine.localhost
ServerAlias www.searchengine.localhost
ServerAdmin webmaster@localhost
DocumentRoot /home/user/projects/searchengine.localhost
ProxyVia On
ProxyRequests Off
ProxyPreserveHost on
<Location />
ProxyPass http://localhost:5265/ retry=0 timeout=30
ProxyPassReverse http://localhost:5265/
</Location>
<Location /socket.io>
RewriteEngine On
RewriteCond %{QUERY_STRING} transport=websocket [NC]
RewriteRule /(.*) ws://localhost:5265/socket.io/$1 [P,L]
ProxyPass http://localhost:5265/socket.io retry=0 timeout=30
ProxyPassReverse http://localhost:5265/socket.io
</Location>
<Proxy *>
Options FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Proxy>
</VirtualHost>
this.io = io('http://yourhostname.localhost');