Skip to content

Commit e0d0d19

Browse files
Alan Agiusalexeagle
authored andcommitted
fix(@angular-devkit/build-angular): passing port 0 when using serve will not find a suitable port
At the moment, when passing port `0` it will default to `4200` which is incorrect. `4200` should be used a baseport.
1 parent 8440a17 commit e0d0d19

File tree

1 file changed

+1
-1
lines changed
  • packages/angular_devkit/build_angular/src/dev-server

1 file changed

+1
-1
lines changed

packages/angular_devkit/build_angular/src/dev-server/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export class DevServerBuilder implements Builder<DevServerBuilderOptions> {
6767
let first = true;
6868
let opnAddress: string;
6969

70-
return from(checkPort(options.port, options.host)).pipe(
70+
return from(checkPort(options.port || 0, options.host || 'localhost', 4200)).pipe(
7171
tap((port) => options.port = port),
7272
concatMap(() => this._getBrowserOptions(options)),
7373
tap(opts => browserOptions = normalizeBuilderSchema(

0 commit comments

Comments
 (0)