We have multiple apps at our company.
The main one has port 4200, the second one 4201 and the third one 4202.
We have this port defined in .ember-cli
{
...
"port": 4200,
...
}
We don't want any other port, we want the app to crash with "Port already in use".
This works for the apps on ports 4201, 4202... but not for the app with 4200.
Here it serves with the next available port, which is conflicting with our other app's port.
I've tracked it down to here: stopPort is not provided to PortFinder, because the port I specified is the same as the default Ember port, meaning it keeps searching for the next available port.
|
if (commandOptions.port !== 0 && commandOptions.port !== DEFAULT_PORT) { |
Problem is that you have || DEFAULT_PORT defined here, but also as default in the available command options. So commandOptions.port is almost always defined (by default)
We have multiple apps at our company.
The main one has port 4200, the second one 4201 and the third one 4202.
We have this port defined in
.ember-cli{ ... "port": 4200, ... }We don't want any other port, we want the app to crash with "Port already in use".
This works for the apps on ports 4201, 4202... but not for the app with 4200.
Here it serves with the next available port, which is conflicting with our other app's port.
I've tracked it down to here: stopPort is not provided to PortFinder, because the port I specified is the same as the default Ember port, meaning it keeps searching for the next available port.
ember-cli/lib/commands/serve.js
Line 126 in 677dd6d
Problem is that you have
|| DEFAULT_PORTdefined here, but also as default in the available command options. So commandOptions.port is almost always defined (by default)