dev
nx dev my-appRuns astro dev for the project until you stop it. The target is not cached.
Astro 7 moves the development server to the background when a coding agent starts it. The executor keeps it in the foreground, so that Nx can stop it; set ASTRO_DEV_BACKGROUND=1 to allow it.
Options
Section titled “Options”| Option | Type | Default | Description |
|---|---|---|---|
port |
number | none | Port of the server. Without it Astro uses server.port of its config, otherwise 4321. |
host |
string | boolean | none | Network address to listen on; true listens on all addresses. Without it Astro listens on localhost. |
open |
string | boolean | false |
Opens the browser when the server starts; a string is the URL to open. |
root |
string | none | Project directory. Nx knows it, so you rarely set this. |
config |
string | none | Path of the Astro config file. Without it Astro finds astro.config.* itself. |
site |
string | none | Overrides site of the Astro config. |
base |
string | none | Overrides base of the Astro config. |
verbose |
boolean | false |
Verbose output. |
additionalArgs |
array | none | More command-line arguments for Astro. |
Example
Section titled “Example”nx dev my-app --port=3000 --host