Skip to content

Commit

Permalink
Add http server so it listens on now
Browse files Browse the repository at this point in the history
  • Loading branch information
remixz committed Feb 10, 2017
1 parent 651cb1a commit 8a71bcb
Show file tree
Hide file tree
Showing 3 changed files with 569 additions and 2 deletions.
8 changes: 7 additions & 1 deletion server/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
const io = require('socket.io')(3001)
const micro = require('micro');
const http = micro(() => '');
const io = require('socket.io')(http)
io.origins('*:*')

function findRoom (rooms) {
Expand Down Expand Up @@ -45,3 +47,7 @@ io.on('connection', (socket) => {
io.to(room).emit('change', mediaId)
})
})

http.listen(3001, () => {
console.log('listening on 3001')
})
1 change: 1 addition & 0 deletions server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"author": "Zach Bruggeman",
"license": "MIT",
"dependencies": {
"micro": "^7.0.3",
"socket.io": "^1.7.2"
},
"scripts": {
Expand Down
Loading

0 comments on commit 8a71bcb

Please sign in to comment.