Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/_posts/languages/nodejs/2000-01-01-nextjs-standalone.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,16 @@ Start the server using Node.js.
```json
{
"scripts": {
"start": "node .next/standalone/server.js"
"start": "node .next/standalone/server.js --hostname 0.0.0.0"
// others scripts
}
}
```

{% warning %}
Ensure that the `--hostname` is set to 0.0.0.0 to avoid the [boot timeout issue]({% post_url languages/nodejs/2000-01-01-start %}#nextjs).
{% endwarning %}

{% note %}
Reason: after build node_modules will have been removed, so the original command `next start` will error: `"sh: 1: next: not found"`
{% endnote %}
Expand Down