A simple dinosaur reference app built with Astro and running on Deno. This tutorial demonstrates the basics of building and deploying a static site with dynamic routing using modern web technologies.
You can deploy your own version of this Astro app to Deno Deploy immediately. Just click the button to clone and deploy.
# Clone or create this project
deno create astro@latest -- --template minimal
# Install dependencies
deno install
# Start development server
deno dev
Visit http://localhost:4321 to see your dinosaur directory!
This tutorial app demonstrates a clean, scalable architecture:
/
├── public/
│ └── favicon.svg
├── src/
│ ├── data/
│ │ └── data.json # Dinosaur data (973 entries!)
│ ├── lib/
│ │ └── dinosaur-service.ts # Business logic & utilities
│ ├── pages/
│ │ ├── index.astro # Homepage with dinosaur list
│ │ └── dinosaur/
│ │ └── [slug].astro # Dynamic routes for each dinosaur
│ └── styles/
│ └── index.css # Shared styles
├── package.json
└── README.md
.astro file in src/pages/ becomes a route[slug].astro creates pages for each dinosaur automaticallyAll commands are run from the root of the project, from a terminal:
| Command | Action |
|---|---|
deno install |
Installs dependencies |
deno dev |
Starts local dev server at localhost:4321 |
deno build |
Build your production site to ./dist/ |
deno preview |
Preview your build locally, before deploying |
deno astro ... |
Run CLI commands like astro add, astro check |
deno astro -- --help |
Get help using the Astro CLI |
src/data/data.jsonDinosaurService handles data access and URL slug generation[slug].astro routingThis project teaches you:
Check out the Astro documentation or the Deno documentation.
This is a tutorial project demonstrating Astro + Deno basics with a fun dinosaur theme! 🦕