summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ae5194f)
Nothing useful yet, just a print on the server side to prove it's working.
+
+ <script src="/socket.io/socket.io.js"></script>
+ <script>
+ var socket = io();
+ </script>
const app = express();
const http = require('http');
const server = http.createServer(app);
const app = express();
const http = require('http');
const server = http.createServer(app);
+const { Server } = require("socket.io");
+const io = new Server(server);
const port = 2122;
app.get('/index.html', (req, res) => {
res.sendFile(__dirname + '/index.html');
});
const port = 2122;
app.get('/index.html', (req, res) => {
res.sendFile(__dirname + '/index.html');
});
+io.on('connection', (socket) => {
+ console.log('a user connected');
+});
+
server.listen(port, () => {
console.log(`listening on *:${port}`);
});
server.listen(port, () => {
console.log(`listening on *:${port}`);
});