Generating a Frontend Demo

Cool, You now have infra and core services up and running! For front-end, CX Cloud CLI allows you to generate a front-end demo to test the concept with end-to-end functionality. Currently, we provide Angular 7 demo. React is coming soon.

Front-end generation

You start by creating a new repository for the service in Github, named for example frontend-demo. Then clone it to your project folder and start front-end demo generation by running the following commands:

$ git clone
$ cd frontend-demo
$ cxcloud generate demo

You will go through a set of simple questions and receive an end-to-end working demo.


By default, the generated demo uses our live test API including end points with pre-filled sets of data for Commerce, Content and Search services.

In order to enable the frontend demo to work with the APIs you have generated and deployed, configuration files need to be modified. Configuration files can be found in this project directory /src/environments/.

To connect with new APIs, change the value of apiUrl for each service (notice that environments files should be modified depending on the used environment). Assuming your CX Cloud URL is, your environment.development.ts should look like this:

export const environment = {
production: false,
siteName: 'CXCloud DEV',
commerce: {
apiUrl: '',
indexName: 'dev_COMMERCE'
content: {
apiUrl: '',
indexName: 'dev_CONTENT'
auth: {
apiUrl: ''
search: {
apiUrl: ''

Local test

In case of Angular demo, to explore it, from inside of the project folder you should run the following command:

$ npm run dev

By default, your demo will be available at http://localhost:4200/ but check the console logs.


Run the following command to deploy your frontend demo:

$ cxcloud deploy


After deployment, you can make your service available to the world using a Routing Manifest.


As a final step, commit changes to your Github repository by running the following commands:

$ git add .
$ git commit -m "initial commit"
$ git push