Skip to content

Commit

Permalink
fix(cli): default to listening on localhost
Browse files Browse the repository at this point in the history
  • Loading branch information
rexxars committed Aug 16, 2022
1 parent e9b4c7d commit 1306995
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/sanity/src/cli/actions/start/startAction.ts
Expand Up @@ -62,7 +62,8 @@ function getDevServerConfig({
// Order of preference: CLI flags, environment variables, user build config, default config
const env = process.env // eslint-disable-line no-process-env

const httpHost = flags.host || env.SANITY_STUDIO_SERVER_HOSTNAME || cliConfig?.server?.hostname
const httpHost =
flags.host || env.SANITY_STUDIO_SERVER_HOSTNAME || cliConfig?.server?.hostname || 'localhost'

const httpPort = toInt(
flags.port || env.SANITY_STUDIO_SERVER_PORT || cliConfig?.server?.port,
Expand Down

0 comments on commit 1306995

Please sign in to comment.