Unlisted
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
11
12
13
14
import { publish } from "https://esm.town/v/saolsen/qstash";
import { init, traced_handler } from "https://esm.town/v/saolsen/tracing?v=136";
init("try_qstash_publish");
const endpoint = "https://saolsen-try_qstash_receive.web.val.run";
async function handler(req: Request): Promise<Response> {
const result = await publish({ hello: "world" }, { url: endpoint });
console.log(result.messageId);
return Response.json({ ok: result });
}
export default traced_handler(handler);
saolsen-try_qstash_publish.web.val.run
January 5, 2024