Skip to content

Commit

Permalink
update angular xmcloud and xmcloud proxy readmes (#1985)
Browse files Browse the repository at this point in the history
  • Loading branch information
yavorsk authored Nov 28, 2024
1 parent 196a36a commit 991c8f5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This Single Page Application (SPA) built with Angular is designed to be fully co

- `Context ID`: The Context ID environment variable simplifies setting up and configuring XM Cloud solutions. It's a unified identifier that maps to all your configured resources, such as content, sites, files, forms, and integration settings.

- `Pages new editing integration via HTTP render engine endpoint`: Before JSS 22.1, JSS Next.js apps integrated with Sitecore editors through chromes, where data was sent via a POST request. With the 22.1 release, a new metadata method was introduced, rendering the app inside an iframe in XM Cloud Pages, offering benefits like faster load times, simpler configuration, and direct local host connections without tunneling.
- `XM Cloud Pages editing integration`: full integration with Pages - the dynamic visual page editor of XM Cloud.

- `XM Cloud proxy personalization` with embedded personalization and A/B Component Test support.

Expand Down Expand Up @@ -43,13 +43,18 @@ The following environment variables can be set to configure the angular app. You

## Build & run

Build your Angular SPA app bundle with `jss build` or `npm run build`. The build output should be placed in the `dist` folder and will automatically get copied to the proxy app.
### Running the application in production mode

To run your app in production mode. Go to the proxy app:
To build and run in production mode you need to have your angular app side by side with the [Node XM CLoud proxy](https://github.com/Sitecore/jss/tree/dev/packages/create-sitecore-jss/src/templates/node-xmcloud-proxy). For additional information on how to set up and run SPA app in production mode against XM CLoud instance you can check the [spa-starters](https://github.com/sitecorelabs/xmcloud-foundation-head/tree/main/headapps/spa-starter) monoreopo readme.

1. Run `npm install`
1. Run `npm install` for both angular and proxy apps
2. Run `npm run build` in the angular app root; this will build the angular app and copy the the resulting `/dist` folder into the specified proxy app folder
3. Run `npm run start` in the proxy app root

### Running the application in connected mode

2. Run `npm run start`
When building and running your app in connected mode the proxy application is not needed. However, please note that certain features, such as personalization, server-side rendering, and editing, will not be available.

You should be able to see the following message:
`server listening on port 3000!`.
1. Run `npm install`
2. Run `npm run build`
3. Run `npm run start:connected`
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This is a sample setup showing one of how you can configure XM Cloud rendering s

- `Context ID`: The Context ID environment variable simplifies setting up and configuring XM Cloud solutions. It's a unified identifier that maps to all your configured resources, such as content, sites, files, forms, and integration settings.

- `Pages new editing integration via HTTP render engine endpoint`: Before JSS 22.1, JSS Next.js apps integrated with Sitecore editors through chromes, where data was sent via a POST request. With the 22.1 release, a new metadata method was introduced, rendering the app inside an iframe in XM Cloud Pages, offering benefits like faster load times, simpler configuration, and direct local host connections without tunneling.
- `XM Cloud Pages editing integration`: full integration with Pages - the dynamic visual page editor of XM Cloud.

- `XM Cloud proxy personalization` with embedded personalization and A/B Component Test support.

Expand Down

0 comments on commit 991c8f5

Please sign in to comment.