How can I allow access outside the localhost at Angular2? I can navigate at localhost:3030/panel easily but I can not navigate when I write my IP such as
localhost:3030/panel
Create proxy.conf.json and paste this configuration
proxy.conf.json
{ "/api/*": { "target": "http://localhost:7070/your api project name/", "secure": false, "pathRewrite": {"^/api" : ""} } }
Replace:
let url = 'api/'+ your path;
Run from CLI:
ng serve --host port.number —-proxy-config proxy.conf.json