Skip to content

Commit

Permalink
fixes #1
Browse files Browse the repository at this point in the history
  • Loading branch information
joanfabregat committed Dec 2, 2024
1 parent 9308073 commit 67baf05
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions main.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@ const cpUpload = upload.fields([
{name: 'watermark', maxCount: 1},
]);

/**
* Health check endpoint
*/
app.get('/health', (req, res) => {
res.json({
status: "up",
timestamp: new Date().toISOString()
});
});

/**
* Apply watermark to an image
*/
app.post('/apply', cpUpload, async (req, res) => {
const imageFile = req.files['image'][0];
const watermarkFile = req.files['watermark'][0];
Expand Down

0 comments on commit 67baf05

Please sign in to comment.