diff --git a/src/frontend/src/content/docs/reference/cli/commands/aspire-new.mdx b/src/frontend/src/content/docs/reference/cli/commands/aspire-new.mdx index 3de02172a..551f99039 100644 --- a/src/frontend/src/content/docs/reference/cli/commands/aspire-new.mdx +++ b/src/frontend/src/content/docs/reference/cli/commands/aspire-new.mdx @@ -6,6 +6,7 @@ description: Learn about the aspire new command and its usage. This command crea import AsciinemaPlayer from '@components/AsciinemaPlayer.astro'; import Include from '@components/Include.astro'; +import LearnMore from '@components/LearnMore.astro'; import { Aside } from '@astrojs/starlight/components'; ## Name @@ -33,6 +34,50 @@ This command defaults to **interactive** mode. When executed without any options with Aspire templates as an alternative for project creation. +## Interactive prompts + +When running `aspire new` in interactive mode, the command asks one or more questions before generating the project. The available prompts depend on the template and options you provide. + +### Use \*.dev.localhost URLs? + +During project creation, you may be prompted: + +> **Use \*.dev.localhost URLs?** + +This prompt determines whether the generated launch profile configures your Aspire services to be accessible via `*.dev.localhost` wildcard subdomain URLs (for example, `https://myservice.dev.localhost`) instead of standard `http://localhost` with port numbers. + +#### What are \*.dev.localhost URLs? + +`*.dev.localhost` is a wildcard subdomain pattern that resolves to your local machine (`127.0.0.1` or `::1`) in most modern browsers without additional DNS configuration. Safari on macOS is an exception and may require hosts-file entries for `*.dev.localhost` subdomains. The ASP.NET Core HTTPS development certificate includes `*.dev.localhost` as a Subject Alternative Name (SAN), so browsers trust connections to any subdomain under `*.dev.localhost` when the certificate is installed and trusted. + +#### Yes — use \*.dev.localhost URLs + +Choosing **Yes** configures the generated project so that each service gets a unique subdomain URL such as `https://myservice.dev.localhost`. This option: + +- Enables HTTPS for all services from the start, leveraging the wildcard development certificate. +- Gives each service its own origin, which prevents cookie and authentication token collisions between services running on the same machine. +- More closely mirrors a production setup where services are hosted on separate (sub)domains. + +**Prerequisite:** The ASP.NET Core HTTPS development certificate must be installed and trusted on your machine. Run the following command if you haven't done so already: + +```bash title="Aspire CLI" +aspire certs trust +``` + + + [Command reference: `aspire certs trust`](../aspire-certs-trust/) + + + + +#### No — use standard localhost URLs (default) + +Choosing **No** (the default) configures services with standard `http://localhost:` addresses. This option requires no certificate setup and works in all browsers and tools without additional configuration. + ## Options The following options are available: