Skip to content

ng serve --proxy-config proxy.conf.json doesn't work #7160

@zhxx

Description

@zhxx

Bug Report or Feature Request (mark with an x)

- [x ] bug report -> please search issues before submitting
- [ ] feature request

Versions.

@angular/cli: 1.2.5
node: 6.11.0
os: win32 x64
@angular/animations: 4.3.1
@angular/common: 4.3.1
@angular/compiler: 4.3.1
@angular/core: 4.3.1
@angular/forms: 4.3.1
@angular/http: 4.3.1
@angular/platform-browser: 4.3.1
@angular/platform-browser-dynamic: 4.3.1
@angular/router: 4.3.1
@angular/cli: 1.2.5
@angular/compiler-cli: 4.3.1
@angular/language-service: 4.3.1

Repro steps.

ng new proxy-config-project
cd proxy-config-project

Create a file next to projects package.json called proxy.conf.json with the content
{
"/api": {
"target": "http://localhost:3000",
"secure": false
}
}

Run following command

ng serve --proxy-config proxy.conf.json

The log given by the failure.

There is no error message, but something is expected like:
[HPM] Proxy created: /api -> http://localhost:3000

Desired functionality.

Mention any other details that might be useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions