Normally, when a user calls
ember serve
The local host is always 4200 by default. It would be nice if I could specify a different port so that I could have two ember web apps running. Is it possible to have a ember serve a different port?
The reason I care is that I'm using one of my web apps to help me build the other, and it would be convenient to have them both running at the same time so that I don't keep going back and forth with my builds.
yeah, of course, you can! you can either pass the --port
arg directly to the serve command as - ember serve --port=4201
or else you can specify in the .ember-cli
file (will be present in your root directory) as follow
{
/**
Ember CLI sends analytics information by default. The data is completely
anonymous, but there are times when you might want to disable this behavior.
Setting `disableAnalytics` to true will prevent any data from being sent.
*/
"disableAnalytics": false,
"port": 4201
}
if you mention this in .ember-cli file, then ember serve
will run in the specified port by default.
Yes, you can specify the ports for your ember apps:
ember server --port 1234 --live-reload-port 1235
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With