This commit is contained in:
mike
2025-12-12 09:12:03 +01:00
parent 08908d80d5
commit 92f145e6b3
12 changed files with 1638 additions and 71 deletions

View File

@@ -1,4 +1,11 @@
require('dotenv').config()
const swaggerUi = require('swagger-ui-express');
const YAML = require('yamljs');
const path = require('path');
const swaggerPath = path.join(__dirname, 'swagger.yml');
const swaggerDoc = YAML.load(swaggerPath);
const express = require('express')
const http = require('http')
const socketIo = require('socket.io')
@@ -105,6 +112,7 @@ const io = socketIo(server, {
})
app.use(express.json({ limit: '50mb' }))
app.use('/docs', swaggerUi.serve, swaggerUi.setup(swaggerDoc));
// Middleware
function validateApiKey(req, res, next) {