Skip to content

Astro Reference

Overview of things learned about the Astro Web Framework.

This wiki was build with Astro Starlight. Here’s the process I went through to set it up.

  1. Install Astro Starlight
  2. Run command
npm create astro@latest

Overview of setting up the Astro Starlight template to be deployed to my Cloudflare Worker.

Reference Docs

  1. Install Astro CLI:
npm install -g astro
  1. Run command: Global
npm install wrangler@latest --save-dev

Project only

npm install -D wrangler@latest
  1. Create wrangler.jsonc file, add
{
"name": "my-astro-app",
"compatibility_date": "YYYY-MM-DD", // Update to the day you deploy
"assets": {
"directory": "./dist",
}
}
  1. Run command:
npx astro build && npx wrangler dev
  1. Run command:
npx astro build && npx wrangler deploy

This will take you to the CloudFlare web app (through a web browser) to set up a worker. It will set up the worker with a default CF Workers domain.

  1. Configure new worker to use custom domain.