const express = require('express');
const path = require('path');
const { WebSocketServer } = require('ws');
const { createServer } = require('http');

const config = require('./config.json');

const app = express();
const server = createServer(app);
const wss = new WebSocketServer({ server });

app.use(express.json());
app.set('view engine', 'ejs');
app.set('views', path.join(__dirname, 'ejs'));


app.get('/', (req, res) => {
    res.render('home');
});

app.listen(config.port, () => {
    console.log(`Server started on port ${config.port}`);
});