diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..7dabda3 --- /dev/null +++ b/public/index.html @@ -0,0 +1,19 @@ + + + + + + + cardGame + + + + + + + + + + + + diff --git a/public/main.js b/public/main.js new file mode 100644 index 0000000..42be640 --- /dev/null +++ b/public/main.js @@ -0,0 +1 @@ +var socket = io(); diff --git a/public/style.css b/public/style.css new file mode 100644 index 0000000..cbb32d0 --- /dev/null +++ b/public/style.css @@ -0,0 +1,11 @@ +html,body{ + margin: 0; + padding: 0; + background-color: #a1abaa; +} + +canvas{ + margin: auto; + display: block; +} + diff --git a/server.js b/server.js new file mode 100644 index 0000000..6dc6276 --- /dev/null +++ b/server.js @@ -0,0 +1,17 @@ +const express = require('express'); +const app = express(); +const http = require('http').Server(app); +const port = process.env.PORT || 3000; + +const io = require('socket.io')(http); + +app.use(express.static(__dirname + '/public')); + +io.on('connection', onConnection); + +http.listen(port, () => console.log('listening on port ' + port)); + +function onConnection(socket){ + console.log('a user connected'); +} +