Skip to content

Commit 7894917

Browse files
committed
Change default host in the docs
1 parent e14fde3 commit 7894917

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/create-razzle-app/templates/default/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ Last but not least, if you find yourself needing a more customized setup, Razzle
155155
* `process.env.REACT_BUNDLE_PATH`: Relative path to where React will be bundled during development. Unless you are modifying the output path of your webpack config, you can safely ignore this. This path is used by `react-error-overlay` and webpack to power up the fancy runtime error iframe. For example, if you are using common chunks and an extra entry to create a vendor bundle with stuff like react, react-dom, react-router, etc. called `vendor.js`, and you've changed webpack's output to `[name].js` in development, you'd want to set this environment variable to `/static/js/vendor.js`. If you do not make this change, nothing bad will happen, you will simply not get the cool error overlay when there are runtime errors. You'll just see them in the console. Note: This does not impact production bundling.
156156
* `process.env.VERBOSE`: default is false, setting this to true will not clear the console when you make edits in development (useful for debugging).
157157
* `process.env.PORT`: The `BUILD_TARGET=server` build listens on this port for all NODE_ENVs. default is `3000`
158-
* `process.env.HOST`: The IP address that the server will bind to. default is `0.0.0.0`, for INADDR_ANY
158+
* `process.env.HOST`: The IP address that the server will bind to. default is `localhost`, for INADDR_ANY
159159
* `process.env.NODE_ENV`: `'development'` or `'production'`
160160
* `process.env.BUILD_TARGET`: either `'client'` or `'server'`
161161
* `process.env.PUBLIC_PATH`: Only in used in `razzle build`. You can alter the `webpack.config.output.publicPath` of the client assets (bundle, css, and images). This is useful if you plan to serve your assets from a CDN. Make sure to _include_ a trailing slash (e.g. `PUBLIC_PATH=https://cdn.example.com/`). If you are using React and altering the public path, make sure to also [include the `crossorigin` attribute](https://reactjs.org/docs/installation.html#using-a-cdn) on your `<script>` tag in `src/server.js`.

packages/razzle/config/env.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function getClientEnvironment(target, is_dev, options, paths) {
5151
NODE_ENV: process.env.NODE_ENV || 'development',
5252
PORT: process.env.PORT || options.port || 3000,
5353
VERBOSE: !!process.env.VERBOSE,
54-
HOST: process.env.HOST || options.host || '0.0.0.0',
54+
HOST: process.env.HOST || options.host || 'localhost',
5555
RAZZLE_ASSETS_MANIFEST: paths.appAssetsManifest,
5656
BUILD_TARGET: target === 'web' ? 'client' : 'server',
5757
// only for production builds. Useful if you need to serve from a CDN

website/pages/docs/environment-variables.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
- `process.env.REACT_BUNDLE_PATH`: Relative path to where React will be bundled during development. Unless you are modifying the output path of your webpack config, you can safely ignore this. This path is used by `react-error-overlay` and webpack to power up the fancy runtime error iframe. For example, if you are using common chunks and an extra entry to create a vendor bundle with stuff like react, react-dom, react-router, etc. called `vendor.js`, and you've changed webpack's output to `[name].js` in development, you'd want to set this environment variable to `/static/js/vendor.js`. If you do not make this change, nothing bad will happen, you will simply not get the cool error overlay when there are runtime errors. You'll just see them in the console. Note: This does not impact production bundling.
1010
- `process.env.VERBOSE`: default is false, setting this to true will not clear the console when you make edits in development (useful for debugging).
1111
- `process.env.PORT`: The `BUILD_TARGET=server` build listens on this port for all NODE_ENVs. default is `3000`
12-
- `process.env.HOST`: The IP address that the server will bind to. default is `0.0.0.0`, for INADDR_ANY
12+
- `process.env.HOST`: The IP address that the server will bind to. default is `localhost`, for INADDR_ANY
1313
- `process.env.NODE_ENV`: `'development'` or `'production'`
1414
- `process.env.BUILD_TYPE`: `'iso'` for isomorphic/universal applications or `'spa'` for single page applications. The default is `'iso'`. This is set by CLI arguments.
1515
- `process.env.BUILD_TARGET`: either `'client'` or `'server'`

0 commit comments

Comments
 (0)