i'm writing a serverless node rest api, and i have few functions and today i faced an issue on sending responds from lambda function to api gateway, my callback doesn't work as it expected, what i am doing wrong?
module.exports.create = (event, context, callback) => {
client.on('connect', () => {
console.log("connected to redis");
callback(null, {
statusCode: 200,
headers: { 'Content-Type': 'text/plain' },
body: 'connection established.',
});
return;
});
};