Tuesday, 29 September 2020

Angular build deploy in PCF subdirectory

Currently we are using PCF to deploy an angular app. We got requirement to deploy another build but this time within Sub-directory.

For Example:

sites.example.com --> Build 1

sites.example.com/site2 --> Build 2

We might get more requirement in future to add more sites for different build.

I have used the below command to create a route in the PCF cloud.

cf create-route PROJECTS example.com --hostname sites --path site2

And then in the Angular side, i have created build using below command.

ng build --base-href=/site2/

cf push site2

Then after successful CF deployment, i mapped the app with this route sites.example.com/site2

But when i launch the URL in the browser, i am getting the below error with blank page.

enter image description here

Could someone help me on this please? I am not sure where i am going on right path or not.



from Angular build deploy in PCF subdirectory

No comments:

Post a Comment