Created
September 21, 2018 15:21
-
-
Save mutsune/a2a139211447daaf118f604cc7d73c78 to your computer and use it in GitHub Desktop.
minimum socket-io
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const socketio = require('socket.io-client') | |
const socket = socketio('http://localhost:8888'); | |
socket.on('update', d => console.log(d)); | |
socket.on('dynamo', d => console.log(d)); | |
// socket.on('connect', function(){}); | |
// socket.on('event', d => console.log(d)); | |
// socket.on('disconnect', function(){}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "minimum_socket_io", | |
"version": "1.0.0", | |
"description": "", | |
"main": "client.js", | |
"dependencies": { | |
"socket.io-client": "^2.1.1" | |
}, | |
"devDependencies": {}, | |
"scripts": { | |
"start": "node client.js" | |
}, | |
"author": "", | |
"license": "ISC" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment