Courses / Build Modern Websites with Astro / IMPORTANT - Default Port Update

IMPORTANT - Default Port Update

I originally recorded these videos with Astro 2.0, which used 3000 as the default port. After Astro 3.0, the default port became 4321. In the videos, you’ll see port 3000 used throughout.

For following along, you have two options:

  1. Use the default port 4321 (just know yours will differ from the videos).
  2. Set your default port to 3000 in astro.config.mjs.
import { defineConfig } from "astro/config";

// https://astro.build/config
export default defineConfig({
  server: {
    port: 3000,
  },
});

Lesson 5 of 57

9%