Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRealDax committed Jan 30, 2024
1 parent bd2e97f commit d533e4c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ async function Init() {
//Event listeners

// Use requests
app.use('/docs', swaggerui.serve, swaggerui.setup(specs));
app.use(function (req, res, next) {
if (!app.path(req, res)) {
return res.status(404).json({ response: 'Endpoint Not Found' });
Expand All @@ -75,8 +76,6 @@ async function Init() {
}
});

app.use('/docs', swaggerui.serve, swaggerui.setup(specs));

app.listen(PORT, () => {
console.log(`Server is running on port ${PORT}`);
});
Expand Down

0 comments on commit d533e4c

Please sign in to comment.