added the proper production server to openapi.yaml
This commit is contained in:
@@ -4,6 +4,8 @@ info:
|
||||
version: 1.0.0
|
||||
description: A REST API for managing project ideas, projects, materials, and files
|
||||
servers:
|
||||
- url: https://idea-tracker-api.onrender.com/
|
||||
description: Production server
|
||||
- url: http://localhost:8080
|
||||
description: Local development server
|
||||
|
||||
|
||||
BIN
src/.DS_Store
vendored
BIN
src/.DS_Store
vendored
Binary file not shown.
@@ -20,7 +20,7 @@ const PORT = process.env.PORT || 3000;
|
||||
|
||||
app.use(express.json());
|
||||
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'));
|
||||
|
||||
let specs;
|
||||
@@ -31,8 +31,8 @@ try {
|
||||
console.log('Failed to load OpenAPI specification', error);
|
||||
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/ideas', ideasRoutes);
|
||||
app.use('/api/projects', projectsRoutes);
|
||||
|
||||
Reference in New Issue
Block a user