
This will remain seperate from the client code project folder for now unless there is more reason to merge them together
22 lines
493 B
JavaScript
22 lines
493 B
JavaScript
const express = require('express')
|
|
const socketio = require('socket.io')({
|
|
serveClient: false
|
|
})
|
|
|
|
const app = express()
|
|
|
|
var http = require('http').Server(app);
|
|
var io = require('socket.io')(http)
|
|
|
|
const port = process.env.PORT || 3000
|
|
|
|
|
|
// Signals and shit yo
|
|
io.on('connection', function(socket) {
|
|
// do some kind of header auth checking here
|
|
console.log('New connection')
|
|
|
|
socket.on('create or join', function(room_id) {
|
|
let room = io.sockets.adapter.rooms
|
|
})
|
|
}) |