added the proper production server to openapi.yaml
This commit is contained in:
@@ -4,8 +4,10 @@ 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
|
||||||
|
|
||||||
tags:
|
tags:
|
||||||
- name: Authentication
|
- name: Authentication
|
||||||
|
|||||||
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.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);
|
||||||
|
|||||||
Reference in New Issue
Block a user