I have my composer-rest-server
running on port 3000 and now I try to generate an angular application with yo hyperledger-composer
following the tutorial.
Steps creating the webapp:
After I do npm start
and it seems that the webapp es correctly created because I am able to reach it from the localhost with curl localhost:4200
but when I try to reach it from another host I get nothing.
Both hosts are connected because I can reach the composer server running on port 3000.
you need to change your Angular app's configuration info (for the install) - it is based on your currently configured IP address, that you want to access from 'remote':
1) Change your Angular skeleton app - eg. for application named
my-app
- its the filemy-app/src/app/configuration.ts
(where my-app is the generated app dir). For the network interface/resolvable host you chose, change the property:public ApiIP: string = "localhost";
to be your IP or resolvable host.
2) After building, you can change it as you wish - specifically where it says
ng serve --host 0.0.0.0
tong serve --host {MY_IP}
in yourpackage.json
(leave the rest in!)- see example below: