Public
HTTP (deprecated)
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
1
2
3
4
5
6
7
8
9
10
import { inTheBackground } from "https://esm.town/v/neverstew/inTheBackground";
import { sleep } from "https://esm.town/v/neverstew/sleep";
export default async function(req: Request): Promise<Response> {
inTheBackground(async () => {
await sleep(3000);
console.info(new Date());
});
return Response.json({ time: new Date() });
}