Skip to content

Commit 67baf05

Browse files
committed
fixes #1
1 parent 9308073 commit 67baf05

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

main.mjs

+13
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,19 @@ const cpUpload = upload.fields([
2424
{name: 'watermark', maxCount: 1},
2525
]);
2626

27+
/**
28+
* Health check endpoint
29+
*/
30+
app.get('/health', (req, res) => {
31+
res.json({
32+
status: "up",
33+
timestamp: new Date().toISOString()
34+
});
35+
});
36+
37+
/**
38+
* Apply watermark to an image
39+
*/
2740
app.post('/apply', cpUpload, async (req, res) => {
2841
const imageFile = req.files['image'][0];
2942
const watermarkFile = req.files['watermark'][0];

0 commit comments

Comments
 (0)