Runtime tools : Client engine : Using the client engine service in a React project : Building the UDTTReactProject application
  
Building the UDTTReactProject application
You can configure, verify, and then package the UDTTReactProject application for deployment to another development environment or to a production environment.
Configuring the UDTTReactProject application
Complete the following steps to configure the UDTTReactProject application:
1 Install the Node Package Manager dependencies by completing the following steps:
a From your terminal, open the <UDTT_root>/BTTSample/ClientEngineExample/UDTTReactProject folder.
b Run the following command:
$ npm install
2 Configure the UDTTReactProject application by completing the following steps:
a Deploy and start the UDTTServerProject application, see Setting up and running the UDTTServerProject application.
b Edit the following settings in ../UDTTReactProject/public/unicomsi/btt/clientengine/Configure.js:
i Set CORS to true for cross domain access.
ii Set _BASE to the base url of the UDTTServerProject application.
For example:
CORS : true
var _BASE = "http://<base_URL>:8080/UDTTServerProject/";
Verifying the UDTTReactProject application
Complete the following steps to start the UDTTReactProject application and verify that it is working:
1 Make sure that the UDTTServerProject application is started.
2 From your terminal, open the <UDTT_root>/BTTSample/ClientEngineExample/UDTTReactProject folder.
3 Start the UDTTReactProject application by typing the following command:
$ npm start
4 Start your browser and make sure that cross-site cookies are enabled.
5 Type the following URL: http://localhost:3000.
The ‘Welcome’ screen for the UDTTReactProject application is displayed.
Packaging the UDTTReactProject application
You can package the UDTTReactProject application ready for deployment by completing the following steps from your terminal:
1 Open the <UDTT_root>/BTTSample/ClientEngineExample/UDTTReactProject folder.
2 Type the following command:
$ npm run build
The build folder contains the UDTTReactProject application bundled with React and optimized for performance.
See:
Go up to
Using the client engine service in a React project