Astro JS non-HTML Routes: File & Resource API

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • pdfjs

    A Portable Document Format (PDF) generation library targeting both the server- and client-side.

  • We use the pdfjs package here to generate the PDF for us. It just has dummy content in our case. You might generate it from scratch or compose it from other PDFs in your real-world app. See more on pdfjs usage in the docs. The most important part is the output we return in line 12. For a static site, aim to return an object with a body field which is a string. For SSR you can return a Response object instead and even stream HTML. We use binary encoding here which makes sure Astro encodes PDFs including images (for example) correctly — thanks to @altano for tip here.

  • astro

    The web framework for content-driven websites. ⭐️ Star to support our work!

  • We use the pdfjs package here to generate the PDF for us. It just has dummy content in our case. You might generate it from scratch or compose it from other PDFs in your real-world app. See more on pdfjs usage in the docs. The most important part is the output we return in line 12. For a static site, aim to return an object with a body field which is a string. For SSR you can return a Response object instead and even stream HTML. We use binary encoding here which makes sure Astro encodes PDFs including images (for example) correctly — thanks to @altano for tip here.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts