Skip to content

Instantly share code, notes, and snippets.

@vtno
Created April 29, 2016 09:34
Show Gist options
  • Save vtno/06f7d9c9817311b6b2d08a1f6840e8fe to your computer and use it in GitHub Desktop.
Save vtno/06f7d9c9817311b6b2d08a1f6840e8fe to your computer and use it in GitHub Desktop.
Meteor.startup(()=>{
let server = Meteor.npmRequire('http').createServer()
let io = Meteor.npmRequire('socket.io')(server)
io.on('connection', (socket)=>{
socket.on('hello',(data)=>{
console.log('HELLO BISH')
console.log(data.text)
})
})
server.listen(9999,()=>{
console.log('listening on port 9999')
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment