Public
Script
October 23, 2023
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { newRSSItems } from "https://esm.town/v/stevekrouse/newRSSItems?v=6";
export let postWebhook1 = async (req, res) => {
const a = await newRSSItems({
url: "https://elliot.website/editor/feed.rss",
lastRunAt: new Date("Mon, 31 Oct 2021 00:00:00 +0000"),
});
res.send(`
<h1>My latest RSS</h1>
<ul>${a
.map(
({ title, link, description, pubDate }) => `
<li>
<a href="${link}">
<strong>${title}</strong><small>${pubDate}</small><br>
${description}
</a>
</li>
`
)
.join("")}
</ul>`);
};
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
October 23, 2023