How do you set the port and host for the command ng e2e
using the configuration file?
I know that the following statement can be used on the command line
ng e2e --port <port number> --host <host>
This works well, but it would be more convenient to set the port and address in the configuration file. I looked inside .angular-cli.json
and found that there is a file with a name protractor.config.js
, I could not figure out which settings to use in this file, there is a parameter there baseUrl
, but changing this does not make a difference with the port used by the command ng e2e
. It seems to be using a random port.
Besides baseUrl
, I also tried to install port
and seleniumPort
, but they have no meaning.
After entering the command ng e2e
, the following output will appear in the console
** NG Live Development Server is running on http:
As protractor.config.js
I have baseUrl
set as http://localhost:50000
. I watched the tests run, and I see that the browser uses an address http://localhost:49155
that is not the desired address.
ng --version
returns followin
@ angular / cli: 1.0.0
node: 7.7.1
os: win32 x64
@ angular / general: 4.0.3
@ angular / compiler: 4.0.3
@ angular / core: 4.0.3
@ angular / forms: 4.0.3
@ angular / http: 4.0.3
@ angular / platform browser: 4.0.3
@ angular / platform-browser-dynamic: 4.0.3
@ angular / router: 4.0.3
@ angular / cli: 1.0.0
@ angular / compiler-cli : 4.0.3