Skip to content

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

Closed

Description

@angelozerr

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!

Activity

  1. yahyaKacem commented on Jun 21, 2016

    @yahyaKacem

    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
    }
    
    
  2. pavlos256 commented on Jun 21, 2016

    @pavlos256

    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.

  3. angelozerr commented on Jun 30, 2016

    @angelozerr
    Author

    Many thanks @yahyaKacem!

  4. added
    featureLabel used to distinguish feature request from other issues
    P5The team acknowledges the request but does not plan to address it, it remains open for discussion
    on Jul 4, 2016
  5. added a commit that references this issue on Jan 30, 2017
    b32835a
  6. added a commit that references this issue on Jan 30, 2017
    da255b0
  7. sinedied commented on Feb 2, 2017

    @sinedied
    Contributor

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

  8. added a commit that references this issue on Feb 9, 2017
    d31a0a3
  9. Mahi8686 commented on Feb 10, 2017

    @Mahi8686

    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!!!

  10. kunalingole commented on Sep 9, 2017

    @kunalingole

    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

  11. angular-automatic-lock-bot commented on Sep 7, 2019

    @angular-automatic-lock-bot

    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.

  12. locked and limited conversation to collaborators on Sep 7, 2019
  13. added a commit that references this issue on May 29, 2026
    d0e32f1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P5The team acknowledges the request but does not plan to address it, it remains open for discussionfeatureLabel used to distinguish feature request from other issues

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions