Skip to content

Commit

Permalink
(add) add a status and monitor paths
Browse files Browse the repository at this point in the history
  • Loading branch information
NemesisX1 committed Oct 25, 2023
1 parent 47c787d commit b26036a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ class App {

this.app.use(statusMonitor(
{
title: 'Canal Olympia API Status',
title: 'Canal Olympia API Monitor',
path: '/monitor',
chartVisibility: {
cpu: false,
mem: false,
Expand Down
16 changes: 15 additions & 1 deletion src/routes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,21 @@ router.get('/', function (_req, res, _next) {
*/

res.render('index', { title: 'Welcome to the unofficial Canal Olympia API' });
return res.render('index', { title: 'Welcome to the unofficial Canal Olympia API' });
});


router.get('/status', function (_req, res, _next) {

/*
#swagger.tags = ['/']
#swagger.summary = 'Redirect to the health status page'
*/

return res.redirect('https://canalolympiascrappingapi.betteruptime.com')
})


export default router;

0 comments on commit b26036a

Please sign in to comment.