📝 Edit page
➕ Add page
Response type
Text
exports.handler = function (event) {
const text= "Hello, World!"
return {
statusCode: 200,
body: text,
}
}
JSON
Convert an object to a JSON-formatted string.
exports.handler = function (event) {
const respData = {
message: "Hello World"
eventData: event
}
return {
statusCode: 200,
body: JSON.stringify(respData)
};
}