Skip to content

Instantly share code, notes, and snippets.

@dzmitry-kankalovich
Created May 16, 2021 15:56
Show Gist options
  • Save dzmitry-kankalovich/becf5002eb9151e5b6f3f9368ea75b00 to your computer and use it in GitHub Desktop.
Save dzmitry-kankalovich/becf5002eb9151e5b6f3f9368ea75b00 to your computer and use it in GitHub Desktop.
Notion RSS - Lambda base
const Parser = require('rss-parser');
const parser = new Parser();
exports.handler = async function (event) {
console.log("request:", JSON.stringify(event, undefined, 2));
const feed = await parser.parseURL('http://aws.amazon.com/rss/whats-new.rss');
return {
statusCode: 200,
headers: { "Content-Type": "text/plain" },
body: `${feed.description}`
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment