diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/controllers/health.js | 4 | ||||
-rw-r--r-- | server/routes/health.js | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/server/controllers/health.js b/server/controllers/health.js index 8c443bf..d0ebc4d 100644 --- a/server/controllers/health.js +++ b/server/controllers/health.js @@ -1,5 +1,7 @@ -export const healthCheck = async (req, res) => { +const healthCheck = async (req, res) => { return res.json({ uptime: process.uptime(), }); }; + +export default {healthCheck}; diff --git a/server/routes/health.js b/server/routes/health.js index 2980322..bd48e52 100644 --- a/server/routes/health.js +++ b/server/routes/health.js @@ -1,8 +1,8 @@ import Express from 'express'; -import {healthCheck} from '../controllers/health.js'; +import health from '../controllers/health.js'; const router = Express.Router(); -router.get('/health', healthCheck); +router.get('/health', health.healthCheck); export default router; |