Running the Astro server
Realistically, if you’re working on the frontend, the Astro project is the only thing you need to be running locally, as Payload is being hosted on the dev server.
Ben primarily uses pnpm to manage dependencies and run scripts, so the commands below use pnpm. You can also use npm or yarn if you prefer, just make sure to adjust the commands accordingly. If you’ve personally chosen another package manager, you are expected to know how to run the equivalent commands (which tend to be very similar) in that package manager.
It is expected that you have one of these package managers installed before proceeding.
Staging
Section titled “Staging”The development branch is currently being automatically pulled and deployed on Ben’s Server, Astro / the website frontend is accessible at https://p27astro.benb.au.
Running the Astro server
Section titled “Running the Astro server”The astro project is configured for SSR (Server-Side Rendering) with the Node adapter. If you wish to experiment with building the website, keep in that in mind.
Regardless, you will need to install all dependencies first. This can be done by navigating to the root of the project (/frontend/astro/) and running:
pnpm installCertain dependencies such as sharp may require additional setup, so make sure to check the terminal output for any errors or warnings during installation, and act accordingly.
Once all dependencies are installed, you can start the development server with:
pnpm devIf everything goes to plan, you should see an output like:
> pnpm dev astro v6.1.10 ready in 1603 ms┃ Local http://localhost:4321/┃ Network use --host to expose11:01:30 watching for file changes...Source: Ben’s terminal output when running the dev server for this docs site