Skip to content

Commit

Permalink
fix(nextjs): updated 0.0.0.0 as default hostname (#17902)
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulretnan authored Jul 1, 2023
1 parent 2032bd2 commit 59408e7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/generated/packages/next/executors/server.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"hostname": {
"type": "string",
"description": "Hostname on which the application is served.",
"default": "localhost"
"default": "0.0.0.0"
},
"buildLibsFromSource": {
"type": "boolean",
Expand Down
2 changes: 1 addition & 1 deletion packages/next/src/executors/server/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"hostname": {
"type": "string",
"description": "Hostname on which the application is served.",
"default": "localhost"
"default": "0.0.0.0"
},
"buildLibsFromSource": {
"type": "boolean",
Expand Down
2 changes: 1 addition & 1 deletion packages/next/src/executors/server/server.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default async function* serveExecutor(
);
const projectRoot = context.workspace.projects[context.projectName].root;

const { port, keepAliveTimeout, hostname = 'localhost' } = options;
const { port, keepAliveTimeout, hostname = '0.0.0.0' } = options;

// This is required for the default custom server to work. See the @nx/next:app generator.
process.env.NX_NEXT_DIR = projectRoot;
Expand Down

0 comments on commit 59408e7

Please sign in to comment.