Last active
January 2, 2016 06:09
-
-
Save skylerspaeth/87b01b462a3dcd18f44c to your computer and use it in GitHub Desktop.
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
var express = require('express'); | |
var app = express(); | |
var io = require('socket.io').listen(8081); | |
app.use(express.static('public')); | |
var server = app.listen(3000, function () { | |
var port = server.address().port; | |
console.log('Example app listening at', port); | |
io.on('connection', socket => socket.on('message', msg => newValues(msg))); | |
function newValues(msg) { | |
console.log(msg); | |
data = JSON.parse(msg); | |
console.log(data) | |
// console.log(data.values[0].alpha); | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment