📅  最后修改于: 2022-03-11 15:02:28.531000             🧑  作者: Mango
// Into your Node project
// First install the socket client
// npm install --save socket.io-client
var socket = socketIOClient('http://localhost:9000');
socket.on('pedido', function (data) {
console.log(data);
socket.emit('my other event', { my: 'data' });
});