This project contains the AEM package required to manage the content served to the PWA studio App. The PWA studio app is also part of this project.
The AEM package was bootstrapped using the AEM Project Archetype, to it has the specific structure of that project.
ui.apps
contains the configuration, the resource types and the client librariesui.content
contains the sample contentcore
contains the Sling Models require to render the content
Since this project involves a lot of resources loaded client site you need to set up a CORS proxy in your local environment. I use local-cors-proxy because spinning up a proxy is a one liner, but any proxy server solution would do.
npx local-cors-proxy --proxyUrl (your PWA Studio app URL) --port 8888 --proxyPartial ''
The PWA studio app is in the ui.frontend
project. For instructions on how to build and run the app, please refer to the README of that project.
Prerequisites: clone this repository
Refer to the (PWA Studio app README)[./ui.frontend/README] for details about installing and running the PWA Studio app.
In order to allow an external app to access the AEM instance from a different URL you need to configure CORS. The configuration is found in src/main/content/jcr_root/apps/venia/config/com.adobe.granite.cors.impl.CORSPolicyImpl-spa.config. Make sure you replace the alloworigin
setting with the URL generated by the PWA Studio app (see the PWA Studio app README).
Use mvn clean install -PautoInstallSinglePackage
to install this package in AEM.
Open the URL of the PWA Studio App in your browser. The home page of the app should display a product teaser from your Magento instance. Depending on what sample data you have in your local instance you may need to re-configure the SKU that the product teasers is using.