Framework/Angular2

[Angular2] Back-end와의 Proxy설정 하기

annajinee 2017. 7. 10. 17:27


폴더 내에 proxy.config.json 파일 추가

{
"/api/*": {
"target": "http://ip주소:port번호",
"secure": false,
"logLevel": "debug"
}
}


실행 명령어


ng serve --proxy-config ./proxy.config.json 


로 실행해 줍니다.