Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Fix Default Port Value #202

Merged
merged 12 commits into from
Nov 13, 2018
Merged
Show file tree
Hide file tree
Changes from 3 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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Changelog

Unreleased
----------
### Fixed
* Remove parseInt for serve-cli port value. Casting it to a number caused the default value to return NaN.

4.16.0 - (November 9, 2018)
----------
Expand Down
4 changes: 2 additions & 2 deletions scripts/serve/serve-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ commander
.version(packageJson.version)
.option('--config [path]', 'The webpack config to serve.', undefined)
.option('--host [string]', 'Sets the host that the server will listen on. eg. \'10.10.10.1\'', '0.0.0.0')
.option('--port [number]', 'The port the server should listen on.', Number(parseInt), 8080)
.option('--port [number]', 'The port the server should listen on.', 8080)
.option('-p, --production', 'Passes the -p flag to the webpack config')
.parse(process.argv);

serve({
config: loadWebpackConfig(commander.config),
host: commander.host,
port: commander.port,
port: Number(commander.port),
production: commander.production,
});
4 changes: 2 additions & 2 deletions scripts/serve/serve-static-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const loadWebpackConfig = require('./loadWebpackConfig');
commander
.version(packageJson.version)
.option('--config [path]', 'The webpack config to serve. Alias for <config>.', undefined)
.option('--port [number]', 'The port the app should listen on', parseInt)
.option('--port [number]', 'The port the app should listen on', 8080)
.option('--host [string]', 'Sets the host that the server will listen on. eg. \'10.10.10.1\'', '0.0.0.0')
.option('-p, --production', 'Passes the -p flag to the webpack config, if available.')
.option('--site [path]', 'The relative path to the static site. This takes precidence over webpack config if both are passed.', undefined)
Expand All @@ -20,7 +20,7 @@ serve({
config: loadWebpackConfig(commander.config),
disk: commander.disk,
host: commander.host,
port: commander.port,
port: Number(commander.port),
production: commander.production,
site: commander.site,
});