code update recorded at: 23/09/25 09:26:17

This commit is contained in:
finalz meterz 2025-09-23 09:26:17 +00:00
commit 91cf3b88ed

25
handler.js Normal file
View File

@ -0,0 +1,25 @@
// Define the handler function
export const handler = async (event, res) => {
try {
// Prepare the response JSON
const responseJson = {
message: "Hello World"
};
// Print the JSON response to stdout
console.log(JSON.stringify(responseJson));
// Set the response headers
res.setHeader('Content-Type', 'application/json');
// Send the response JSON
res.end(JSON.stringify(responseJson));
} catch (error) {
// Handle errors
console.error(error);
// Send an error response if needed
res.statusCode = 500;
res.setHeader('Content-Type', 'text/plain');
res.end('Internal Server Error');
}
};