Kopie van https://gitlab.com/studieverenigingvia/ict/centurion met een paar aanpassingen
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
centurion/backend/index.mjs

15 lines
362 B

import express from "express";
import socketIO from "socket.io";
const PORT = 3001;
const app = express();
app.get('/', (req, res) => res.send('Hello World!'));
const server = app.listen(PORT, () => console.log(`Example app listening on port ${PORT}!`));
const io = socketIO(server);
io.on('connection', socket => {
console.log('a user connected');
});