Last active
September 9, 2023 17:06
-
-
Save peplau/d76b07774c1ee1ef3924971f8d060c50 to your computer and use it in GitHub Desktop.
XM Cloud local development cheat sheet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Select the Rendering Host at /sitecore/system/Settings/Services/Rendering Hosts | |
# 2. Create new Rendering Host eg: "Local" | |
# 3. Edit the Local item: | |
# - Server side rendering engine endpoint URL: http://rendering:3000/api/editing/render | |
# - Server side rendering engine application URL: http://rendering:3000 | |
# 4. Select Site Grouping definition under YourSite/Settings/Site Grouping | |
# - Predefined application rendering host field: Select Local |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Setup your project .json files first | |
# Authorize the local project with XM Cloud | |
dotnet sitecore cloud login | |
# Get ProjectId of XM Cloud project | |
dotnet sitecore cloud project list | |
# Get EnvironmentId of XM Cloud environment | |
dotnet sitecore cloud environment list --project-id <project-id> | |
# Run the connect command to XM Cloud | |
dotnet sitecore cloud environment connect -id <environment-id> --allow-write true | |
# Run the connect command to local environment | |
dotnet sitecore connect --ref xmCloud --cm https://xmcloudcm.localhost --allow-write true -n local |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run this at the folder where package.json is | |
npm run start:production | |
# One-time pretifying a file | |
npx prettier --write | |
# Setup VS Code settings - on every save, run prettier | |
# https://www.educative.io/answers/how-to-set-up-prettier-and-automatic-formatting-on-vs-code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Pull serialized items from XM Cloud | |
dotnet sitecore ser pull -n "Dev" | |
# Push to local environment | |
dotnet sitecore ser push -n "local" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment