React4XP Demo
Contents
Spin up your own React4XP personal demo in the cloud, or on your local machine.
What?
A complete demo instance with sample content and React4XP front-end.
Choose from the alternatives below:
To learn the details behind how this front-end was built, head on to the first chapter of the tutorial instead. |
Alternative 1 - Enonic Cloud
Follow these steps to get the demo up and running on our Free plan:
-
Sign up for Enonic cloud
Verify your e-mail and create the account
-
Create a new solution
Use the template called
Headless Movie DB
, and complete the setup. -
Link the front-end to your content
Once the solution is ready, launch
XP admin
and openContent Studio
. Edit theHeadless Movie DB
site, add theReact4XP Demo
application and press SaveYou should how see the new front-end in Content Studio.
-
Publish the changes
Optionally expose the site on a public URL by following the steps below:
-
Select
Ingresses
from the main menu and click Create -
Give it a suitable name, i.e.
moviedb
-
Set the target to
/site/hmdb/master/hmdb
-
Accept creating a new domain, and set the path to
/
-
Leave IDprovider empty and click Create on the final step
-
Visit the Ingress link to see the live site.
If the live site is showing the default preview of Headless Movie DB, you have not published your changes to the site. |
Congratulations, you just deployed a live a React site powered by Enonic! 🚀
Alterrnative 2 - Enonic SDK
Follow the steps below to build and run the demo an a local Enonic developer instance:
-
Install Enonic CLI if you have not already done this
npm install -g @enonic/cli
-
Create a new sandbox by running this command in your terminal:
enonic sandbox create r4xpdemo -t hmdb -f
-
Create the R4XP front-end app by running this command from a new terminal window:
enonic project create my.first.r4xp -r tutorial-react4xp -s r4xpdemo -f
-
Build and deploy the app to your XP sandbox
cd r4xpdemo/ enonic project deploy
-
Link the front-end with your content
Launch
XP admin
and openContent Studio
. Edit theHeadless Movie DB
site, add theReact4XP Demo
application and press SaveYou should how see the demo in Content Studio.
The live version of the site can be found on http://localhost:8080/site/hmdb/master/hmdb
Congratulations, you just built a React site powered by Enonic! 🚀