Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persist "serve" informations ("port", "live-reload-port") into the angular-cli.json #1156

Closed
angelozerr opened this issue Jun 21, 2016 · 7 comments · Fixed by #3908
Closed
Labels
feature Issue that requests a new feature P5 The team acknowledges the request but does not plan to address it, it remains open for discussion

Comments

@angelozerr
Copy link

angelozerr commented Jun 21, 2016

angular-cli.json is used to persist informations about Angular2 project.

It should be cool if we could save too the information about "serve":

  • port
  • live-reload-port

in the angular-cli.json like this:

{
  "serve": {
    "port": 4201,
    "live-reload-port": 49153
  }
}

It will avoid passing port and live-reload-port when you do ng serve

If you accept to do that, it should be very cool too to update the JSON Schema https://github.com/angular/angular-cli/blob/master/lib/config/schema.json that I'm using to have completion for Eclipse Editor. Thanks!

@yahyaKacem
Copy link

you can actually do that but not in the angular-cli.json file rather in .ember-cli in the root of your project like this:

{
  "port": 4201,
  "liveReload": true,
  "host": "dev.domain.org",
  "live-reload-port": 49153
}

@pavlos256
Copy link

Thank you @yahyaKacem.

I wonder if it would be too much to ask for an optional "--save" parameter/flag to ng serve that would persist the options, like this:

ng serve --port 4201 --live-reload-port 50000 --host 0.0.0.0 --save

Not that it's hard to edit .ember-cli by hand but this way it would be documented right there and easier to discover.

@angelozerr
Copy link
Author

Many thanks @yahyaKacem!

@filipesilva filipesilva added feature Issue that requests a new feature P5 The team acknowledges the request but does not plan to address it, it remains open for discussion labels Jul 4, 2016
delasteve added a commit to delasteve/angular-cli that referenced this issue Jan 30, 2017
@sinedied
Copy link
Contributor

sinedied commented Feb 2, 2017

Why not also persist the proxy settings in the configuration file?

MRHarrison pushed a commit to MRHarrison/angular-cli that referenced this issue Feb 9, 2017
@Mahi8686
Copy link

ng serve --host 0.0.0.0 --live-reload-port 49153
Is not working...

When i terminate the application its webpage is not getting loaded...
Can anybody help!!!

@kunalingole
Copy link

kunalingole commented Sep 9, 2017

We are deployed project of Angular 2 and angular cli on AWS server (Production). Change angular-cli.json file
as per below. Use command : ng serve.

angular-cli.json
{
"port": 4201,
"liveReload": true,
"host": "example.com",
"live-reload-port": 49153
}
we use live host name. but error disply
Provided host example.com could NOT be bound. Please provide a different host address or hostname . on aws(amazon) server.
i have attach screen shot also.
Please any suggestion to how to serve application on AWS(amazon)server live host name.

error

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature Issue that requests a new feature P5 The team acknowledges the request but does not plan to address it, it remains open for discussion
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants