javascript - import socket.io using system.js -
i trying include aurelia framework project sockets.io
. have installed sockets by:
jspm install npm:socket.io
then, import:
import {io} "socket.io";
and results is:
get http://localhost:9000/jspm_packages/npm/socket.io-client@1.3.5/package.js 404 (not found)
where problem? why there reference package.js
, not package.json
or socket.io.js
?
on client side (aurelia), should use server.io client
import io 'socket.io-client'; var socket = io('http://localhost:9000'); socket.emit('news', { hello: 'world' });
Comments
Post a Comment