We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent abbd70b commit 657faa5Copy full SHA for 657faa5
1 file changed
src/app.js
@@ -24,14 +24,27 @@ app.use(cors({
24
credentials: true
25
}));
26
app.use(express.json());
27
-app.use(morgan('dev'));
+
28
+app.use(morgan('dev', {
29
+ skip: (req) => req.url === '/health'
30
+ })
31
+);
32
33
app.get('/', (_req, res) => {
34
res.status(200).json({
35
message: "Backend is online"
36
})
37
});
38
39
+app.get('/health', (_req, res) => {
40
+ res.status(200).json({
41
+ status: "ok",
42
+ service: "hms-backend",
43
+ uptime: process.uptime(),
44
+ timestamp: new Date().toISOString()
45
+ });
46
+});
47
48
app.use('/api/auth', authRoutes);
49
app.use('/api/signup', signupRoutes);
50
app.use('/api/admin', adminRoutes);
0 commit comments