feat: Implement device-specific video uploads and generate comprehensive OpenAPI documentation.
This commit is contained in:
@@ -1,17 +1,26 @@
|
||||
import express from 'express';
|
||||
import { toNodeHandler } from 'better-auth/node';
|
||||
import swaggerUi from 'swagger-ui-express';
|
||||
|
||||
import { auth } from './auth';
|
||||
import { buildOpenApiDocument } from './docs/openapi';
|
||||
import videosRoutes from './routes/videos';
|
||||
import adminRoutes from './routes/admin';
|
||||
import { ensureMinioBucket } from './utils/minio';
|
||||
|
||||
const app = express();
|
||||
const openApiDocument = buildOpenApiDocument();
|
||||
|
||||
app.get('/', (_req, res) => {
|
||||
res.send('API is running');
|
||||
});
|
||||
|
||||
app.get('/openapi.json', (_req, res) => {
|
||||
res.json(openApiDocument);
|
||||
});
|
||||
|
||||
app.use('/docs', swaggerUi.serve, swaggerUi.setup(openApiDocument));
|
||||
|
||||
app.all('/api/auth/*splat', toNodeHandler(auth));
|
||||
|
||||
app.use(express.json());
|
||||
|
||||
Reference in New Issue
Block a user