@@ -5,25 +5,25 @@ const parser = new Parser({
55 headers : { "User-Agent" : "Scaleway Serverless Examples" } ,
66} ) ;
77const SOURCE_FEED_URL = process . env . SOURCE_FEED_URL || "https://lobste.rs/rss" ;
8- const WORTHWILE_TOPICS = process . env . WORTHWILE_TOPICS ||
8+ const WORTHWHILE_TOPICS = process . env . WORTHWHILE_TOPICS ||
99 "nixos, nix, serverless, terraform" ;
1010
1111const feed = new RSS ( {
1212 title : `Worthwhile items from ${ SOURCE_FEED_URL } ` ,
13- description : `All about ${ WORTHWILE_TOPICS } ` ,
13+ description : `All about ${ WORTHWHILE_TOPICS } ` ,
1414 language : "en" ,
1515 ttl : "60" ,
1616} ) ;
1717
1818// This is a simple function that given an RSS feed,
19- // filters out the items that contain any of the topics in the WORTHWILE_TOPICS environment variable.
19+ // filters out the items that contain any of the topics in the WORTHWHILE_TOPICS environment variable.
2020// It then exposes a RSS feed on its own, with the filtered items.
2121async function handler ( event , _context , _cb ) {
2222 const userAgent = event . headers [ "User-Agent" ] ;
2323 const ip = event . headers [ "X-Forwarded-For" ] . split ( "," ) [ 0 ] ;
2424 console . log ( "Got request from %s with user agent %s" , ip , userAgent ) ;
2525
26- const topics = WORTHWILE_TOPICS . split ( "," ) . map ( ( t ) => t . trim ( ) ) ;
26+ const topics = WORTHWHILE_TOPICS . split ( "," ) . map ( ( t ) => t . trim ( ) ) ;
2727
2828 const sourceFeed = await parser . parseURL ( SOURCE_FEED_URL ) ;
2929 console . log ( "Parsing feed: %s" , feed . title ) ;
0 commit comments