Skip to content

Commit

Permalink
fixes #2
Browse files Browse the repository at this point in the history
  • Loading branch information
joanfabregat committed Dec 2, 2024
1 parent 524392c commit 85c1add
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 @@ -19,6 +19,19 @@ const tempDir = 'temp';
const app = express();
const upload = multer({dest: tempDir});

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

/**
* Convert a PDF file to an image
*/
app.post('/convert', upload.single('file'), (req, res) => {
if (!req.file?.filename) {
res.status(400);
Expand Down

0 comments on commit 85c1add

Please sign in to comment.