Created
March 15, 2017 09:22
-
-
Save LiamDotPro/a024d6168723a771002c528d3ab626f7 to your computer and use it in GitHub Desktop.
This file contains 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 = require('express')(); | |
var server = require('http').createServer(app); | |
var io = require('socket.io')(server); | |
server.listen(80, function () { | |
console.log('Server Started'); | |
}); | |
server.listen(80); | |
//make the public resources static | |
app.use(express.static(__dirname + '/')); | |
app.get('/', function (req, res) { | |
res.sendFile(path.join(__dirname + '/public/index.html')); | |
//console.log('express serves homepage'); | |
}); | |
//users will be added here | |
var users = new Map(); | |
io.on('connection', function (socket) { | |
socket.on('disconnect', function (){ | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment