Overview
The Astro + Deno Template is a sample project that provides a recommended starting point for building Deno projects using the Astro framework. It is preconfigured to use Deno as the JavaScript runtime for server-side rendering and offers several benefits such as the ability to use Deno’s built-in namespace functions and run in production on Deno Deploy.
Features
- Preconfigured to use Deno as the JavaScript runtime for server-side rendering
- Ability to use built-in Deno namespace functions, including the new Deno KV database
- Compatibility with the majority of npm packages, thanks to Vite and esbuild
- Lightly modified base Astro project with basic CRUD operations for creating resource links
Installation
To use this template, you need to have Deno installed on your computer. If you haven’t already, please install Deno first. Then, follow the Astro documentation to initialize a new Astro project using this template. You can also use this repository as a template on GitHub by clicking the “Use this template” button.
For local development, use npm scripts in the package.json file to start the development server, build a production-ready SSR site, and preview the SSR site locally. These scripts are configured to use the Deno runtime instead of Node.js.
Summary
The Astro + Deno Template is a recommended starting point for building Deno projects using the Astro framework. It offers the benefits of using Deno as the JavaScript runtime for server-side rendering and provides compatibility with npm packages. The template project also includes basic CRUD operations for creating resource links. Overall, this template provides an efficient and reliable setup for developing Deno projects with Astro.