git clone git@github.com:OpenLXP/openlxp-xms-ui.git
Start off by verifying that you have yarn
installed.
yarn -version
If yarn
is not installed use the following command to install it. This will install the yarn
package manager globally on your system.
global install
npm install yarn -g
local install
npm install yarn
Once yarn has been installed you will need to install the project dependencies. Using the following command we will manually set your yarn version for this project.
yarn set version 1.22.1
After the version has been installed and set we will install the dependencies. Using the following command we will install all the project dependencies.
yarn install package.json
This project makes use of globally available environment variables. Below are the required environment variables required for this project.
This is the root API endpoint used by the application to access XIS catalogs.
http://<YOUR_BACKEND_ENDPOINT>/api/catalogs/
This is the endpoint for accessing the XIS compositeledger.
http://<YOUR_BACKEND_ENDPOINT>/es-api/
This is the root API endpoint used by the application to access XIS experiences.
http://<YOUR_BACKEND_ENDPOINT>/api/experiences/
Let's create a local .env.local
file. If you are in a code editor you can right click and create new file.
If you are using the terminal use the following command to create a new file.
bash command
touch <PATH_TO_YOUR_PROJECT_ROOT>/.env.local
powershell
New-Item -Path <PATH_TO_YOUR_PROJECT_ROOT>\.env.local -ItemType File
Navigate to the newly created file and paste the template (below) into the file. Replace <YOUR_BACKEND_ENDPOINT>
with your localhost setup or your live endpoint.
REACT_APP_XIS_CATALOGS_API=<YOUR_BACKEND_ENDPOINT>/api/catalogs/
REACT_APP_XIS_COMPOSITELEDGER_API=<YOUR_BACKEND_ENDPOINT>/api/metadata/
REACT_APP_XIS_EXPERIENCES_API=<YOUR_BACKEND_ENDPOINT>/api/experiences/
To use this piece of code without any issues you will need the XMS component to accompany it.
In the project directory, you can run the following.
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.
Launches the test runner with coverage mode enabled. See the section about running tests for more information.
You can learn more in the Create React App documentation.
To learn React, check out the React documentation.
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify