code update recorded at: 09/02/26 06:36:52

This commit is contained in:
Sukhpreet Lohiya 2026-02-09 06:36:52 +00:00
parent 1160d51a36
commit 7421febcef

22
handler.js Normal file
View File

@ -0,0 +1,22 @@
// Define the handler function
export const handler = async (req, res) => {
try {
// Prepare the response JSON
const responseJson = {
message: "Hello World"
};
// 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');
}
};