add file
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user