Skip to content

Commit 20a644e

Browse files
Alan Agiusalexeagle
Alan Agius
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 a49d278 commit 20a644e

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export class DevServerBuilder implements Builder<DevServerBuilderSchema> {
4848
let first = true;
4949
let opnAddress: string;
5050

51-
return from(checkPort(options.port || 4200, options.host || 'localhost')).pipe(
51+
return from(checkPort(options.port || 0, options.host || 'localhost', 4200)).pipe(
5252
tap((port) => options.port = port),
5353
concatMap(() => this._getBrowserOptions(options)),
5454
tap(opts => browserOptions = normalizeBrowserSchema(

0 commit comments

Comments
 (0)