Skip to content

Commit

A tiny API

syntaqxcommitted The first commitBrowse files
2 files+13−00/2 viewed
+7−0
1+// Says which deployment answered, so a project that depends on this one
2+// can show which of its addresses it was given.
3+export default {
4+ fetch(request) {
5+ return Response.json({ service: "lab-api", version: "v1", host: new URL(request.url).hostname });
6+ },
7+};
+6−0
1+{
2+ // A tiny API, so another project can depend on it.
3+ "name": "lab-api",
4+ "main": "src/index.js",
5+ "compatibility_date": "2026-09-26"
6+}