I expect to start blank application when running ng serve appname
The app compiles and runs, but I get an error in the console when I open the app in my browser at http://localhost:4200
[HPM] Error occurred while trying to proxy request /api/hello from localhost:4200 to http://localhost:3333 (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common_system_errors)
Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.
Please provide detailed steps for reproducing the issue.
Please provide any relevant information about your setup:
[HPM] Error occurred while trying to proxy request /api/hello from localhost:4200 to http://localhost:3333 (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common_system_errors)
Opening Chrome Dev console, in the Network section, the request to /api/hello returns the following message:
Error occured while trying to proxy to: localhost:4200/api/hello
Another question, while I'm here, is there a canonical way to upgrade Nestjs to 6.0, as the current installation uses 5.5? Or should I wait for nx to publish upgrade to 6.0?
My bad, I didn't know I was supposed to do ng serve api as well.
:+1:
Adding more info that might help new comers/first timer
In CLI (Terminal for e.g.) open new tab
user@host:/path/to/your/workspace$ ng serve api
Although I have got the usage on launching api server and angular application separately, I'm still curious that whether there would be cons or risky problems if merge serving angular and api/nest server into one npm script ?
I got caught out by this as a newby. Saved with thanks to this issue
馃憤
Adding more info that might help new comers/first timer
In CLI (Terminal for e.g.) open new tab
user@host:/path/to/your/workspace$ ng serve api
still a valid point
Most helpful comment
My bad, I didn't know I was supposed to do
ng serve apias well.