We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4bb98f0 commit 5171a18Copy full SHA for 5171a18
1 file changed
backend/src/server.js
@@ -22,6 +22,11 @@ if (process.env.NODE_ENV !== 'production') {
22
);
23
}
24
app.use(express.json()); //This middleware will parse JSON bodies: req.body
25
+
26
+app.get('/api/health', (req, res) => {
27
+ res.status(200).json({ ok: true });
28
+});
29
30
app.use(rateLimiter);
31
32
app.use('/api/notes', notesRoutes);
@@ -47,7 +52,3 @@ connectDB().then(() => {
47
52
console.log('Server started on PORT:', PORT);
48
53
});
49
54
50
-
51
-app.get('/api/health', (req, res) => {
- res.status(200).json({ ok: true });
-});
0 commit comments