Added API

This commit is contained in:
2022-08-26 06:36:45 +07:00
parent 56fbe3109c
commit 96bba465d9
8 changed files with 156 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
import * as express from 'express';
import Environment from '../../providers/Environment'
import HealthCheck from '../../controllers/API/v1/HealthCheck';
const router = express.Router();
let isDevEnv = (req: any, res: any, next: any) => {
if(Environment.get().NODE_ENV == 'development') {
return next();
}
else {
return res.sendStatus(403);
}
};
router.get('/health', HealthCheck.perform);
export default router;