added the proper production server to openapi.yaml

This commit is contained in:
2026-04-28 08:41:56 -04:00
parent d590a65c5e
commit e2a53f61df
3 changed files with 5 additions and 3 deletions

View File

@@ -4,6 +4,8 @@ info:
version: 1.0.0 version: 1.0.0
description: A REST API for managing project ideas, projects, materials, and files description: A REST API for managing project ideas, projects, materials, and files
servers: servers:
- url: https://idea-tracker-api.onrender.com/
description: Production server
- url: http://localhost:8080 - url: http://localhost:8080
description: Local development server description: Local development server

BIN
src/.DS_Store vendored

Binary file not shown.

View File

@@ -20,7 +20,7 @@ const PORT = process.env.PORT || 3000;
app.use(express.json()); app.use(express.json());
app.get('/health', (req, res) => res.status(200).json({ status: 'UP' })); app.get('/health', (req, res) => res.status(200).json({ status: 'UP' }));
app.get('/', (req, res) => res.status(200).send('API is running...')); app.get('/', (req, res) => res.status(200).send('API is running...\nVisit /api-docs for API documentation'));
if (process.env.NODE_ENV !== 'test') app.use(morgan('tiny')); if (process.env.NODE_ENV !== 'test') app.use(morgan('tiny'));
let specs; let specs;
@@ -31,8 +31,8 @@ try {
console.log('Failed to load OpenAPI specification', error); console.log('Failed to load OpenAPI specification', error);
process.exit(1); process.exit(1);
} }
app.use('/api-docs', swaggerUI.serve, swaggerUI.setup(specs));
app.use('/api-docs', swaggerUI.serve, swaggerUI.setup(specs));
app.use('/api/auth', authRoutes); app.use('/api/auth', authRoutes);
app.use('/api/ideas', ideasRoutes); app.use('/api/ideas', ideasRoutes);
app.use('/api/projects', projectsRoutes); app.use('/api/projects', projectsRoutes);