Wrote an article
Used Astro
Just dropped a new post about using file routes or resource in 🚀 Astro.

We see JSON and PDF examples and also touch on SSR alternatives, though you might tyr Webhooks too.

Hope you find it useful!

https://rodneylab.com/astro-js-non-html-routes/