SAP Spartacus部署到SAP Commerce Cloud,不同的系统设置不同的OCC Base url

需求

I would like to set environment specific OCC Base URLs


Development

Staging

Production

现在遇到的问题

Currently in the build job, SAP Commerce Cloud always run ng build command which always pick the default app.module.ts irrespective of maintaining this property in environment specific basis, hence all environments will have one environment’s OCC base urls which is not correct.


SAP Commerce Cloud does not provide this option in the specific environment occ base URL for build and deployment


文档:https://sap.github.io/spartacus-docs/configuring-base-url/


然而,This link does not say How to maintain three different OCC base urls for 3 environments


Dear customer, you can set your js app so that it automatically adds the baseurl. See help topic for hosting javascript apps:


https://help.sap.com/viewer/b2f400d4c0414461a4bb7e115dccd779/v2011/en-US/63577f67a67347bf9f4765a5385ead33.html


In your Spartacus app:


index.html has to have


In app.module.ts, remove or comment out baseUrl


During build, the hosting service will substitute the proper server value.


上一篇:国土厅无盘XP系统,设置统一幻灯片屏保。


下一篇:艾伟也谈项目管理,项目管理的十大挑战