Public
Cron
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Runs every 15 min
1
2
3
4
5
6
7
8
9
10
11
12
import { following } from "https://esm.town/v/darcy/following";
import { fetch } from "https://esm.town/v/std/fetch";
export function feed() {
let _feed = following.map(async (name) => {
let req = await fetch(`https://api.val.town/v1/run/${name}.posts`);
let res = (req.status === 200) ? req.json() : {};
return res;
});
console.log(_feed);
return _feed;
}
November 8, 2023