Update index.js
Browse files
index.js
CHANGED
@@ -239,8 +239,8 @@ app.use((err, req, res, next) => {
|
|
239 |
});
|
240 |
});
|
241 |
|
242 |
-
// 404 handler
|
243 |
-
app.use(
|
244 |
res.status(404).json({
|
245 |
success: false,
|
246 |
message: 'Endpoint not found'
|
@@ -252,4 +252,6 @@ app.listen(PORT, () => {
|
|
252 |
console.log(`π Content Extractor API running on port ${PORT}`);
|
253 |
console.log(`π API Documentation: http://localhost:${PORT}`);
|
254 |
console.log(`π₯ Health Check: http://localhost:${PORT}/health`);
|
255 |
-
});
|
|
|
|
|
|
239 |
});
|
240 |
});
|
241 |
|
242 |
+
// 404 handler - fix untuk path-to-regexp error
|
243 |
+
app.use((req, res) => {
|
244 |
res.status(404).json({
|
245 |
success: false,
|
246 |
message: 'Endpoint not found'
|
|
|
252 |
console.log(`π Content Extractor API running on port ${PORT}`);
|
253 |
console.log(`π API Documentation: http://localhost:${PORT}`);
|
254 |
console.log(`π₯ Health Check: http://localhost:${PORT}/health`);
|
255 |
+
});
|
256 |
+
|
257 |
+
export default app;
|