Public
Emails takeaway orders from the website via Resend
emailhttpresend
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.

Air's Thai Kitchen β€” live site + order backend

This val now serves the whole website, not just the backend. index.html is the real, live ordering site, and main.ts serves it (via Val Town's static file helper) at the root URL while also handling POST /order, which emails the order through Resend.

Why both live in one val: the site used to be a claude.ai artifact that called this backend from the browser. That doesn't work β€” a published Claude Artifact's browser sandbox is locked down so it can only call its own origin (connect-src 'self'), so it can never reach an external API no matter how that API is configured. Serving the site from this same val makes the fetch("/order") call same-origin, so there's nothing to block.

The real, live site is now: πŸ‘‰ https://zachary1--7fbcd9dcb2d011f1b1aa1607ee4eb77e.web.val.run

The claude.ai artifact link still exists as a design preview only β€” its "Place order" button can't send anything and will always show the "Couldn't send that automatically" fallback message. Use the val.town link above for actual testing and for sharing with anyone who should be able to place a real order.

Required environment variable

Optional environment variables

Files

  • index.html β€” the full website (menu, basket, checkout). Edit this directly to change the site.
  • main.ts β€” routes /order to the Resend email handler; everything else falls through to serving index.html and its assets.