From 8d8e4a21e39e195bea0f30eea834d2681a1fee7a Mon Sep 17 00:00:00 2001 From: Anthony Sgueglia Date: Wed, 25 Mar 2020 13:24:12 -0400 Subject: [PATCH] added proxying so hot reload can work on ng serve. --- angular.json | 5 +++-- src/proxy.conf.json | 6 ++++++ 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 src/proxy.conf.json diff --git a/angular.json b/angular.json index 1354e78..7eca070 100644 --- a/angular.json +++ b/angular.json @@ -59,7 +59,8 @@ }, "configurations": { "production": { - "browserTarget": "rock-paper-scissors:build:production" + "browserTarget": "rock-paper-scissors:build:production", + "proxyConfig": "src/proxy.conf.json" } } }, @@ -136,4 +137,4 @@ "prefix": "app" } } -} \ No newline at end of file +} diff --git a/src/proxy.conf.json b/src/proxy.conf.json new file mode 100644 index 0000000..a01ed10 --- /dev/null +++ b/src/proxy.conf.json @@ -0,0 +1,6 @@ +{ + "/api": { + "target": "http://localhost:3000/", + "secure": false + } +}