Deploy the Project
A CH5 project can be deployed to a control system or a web server via a .ch5z archive file.
Deploy the Project to a Control System
The ch5-cli deploy utility can be used deploy .ch5z archive files to a control system. The -t/--deviceType parameters of ‘web’ and ‘controlsystem’ will deploy to a control system to make that project available as a HTML5 Web XPanel project. For more information, refer to Create and Deploy CH5 Archives.
NOTE: For Crestron Virtual Control (VC-4) installations, the .ch5z archive utility is loaded directly to the control system along with the SIMPL program using the XPanel (Web) option. For more information, refer to the Crestron Virtual Control Product Manual.
To deploy a Crestron Template Project with the HTML5 Web XPanel functionality to a control system:
NOTE: For instructions on adding HTML5 Web XPanel support to your CH5 project, refer toAdd or Remove HTML5 Web XPanel Support.
- Within the package.json file, copy the following command line into the “scripts” object, which must be updated to include the host name or IP address of your control system.
- Update the existing build:onestep command in the “scripts” object to reference the build:deployweb script, or create a copy of build:onestep named build:onestepweb.
- Issue the npm run build:onestep or build:onestepweb command in the terminal, or select the run one-click NPM script. This command will compile, archive, and deploy the project to the control system.
- Enter the administrator username and password for your control system when prompted. Refer to Create and Deploy CH5 Archives for alternative methods to enter control system credentials on each deployment.
The archive can also be deployed via Crestron Toolbox software using the Web Pages and Mobility Projects function as shown in the image below. Select the shell-template.ch5z file, which is located in the /project/dist/prod folder.
Deploy the Project to a Web Server
CH5 projects are also web projects that can be deployed to static web servers such as IIS (Internet Information Services), NGINX®, or Apache® servers.
To deploy a Crestron Template Project with the HTML5 Web XPanel functionality to a static web server:
NOTE: For instructions on adding HTML5 Web XPanel support to your CH5 project, refer to Add or Remove HTML5 Web XPanel Support
- Create a CH5 archive file (.ch5z) for the CH5 project as described in Create and Deploy CH5 Archives.
- Extract the contents of the .ch5z file to a location on your workstation using WinZip or a similar utility. The extracted contents include a .ch5 file that is also an archive file.
- Extract the contents of the .ch5 file. The extracted contents include files that comprise the web project.
- Load the CH5 web project files to your web server. The index.html file is used to access the HTML5 Web XPanel from a web browser or Crestron Fusion® software.
If deploying a CH5 project to an IIS server, the MIME type for the .cse2j file extension must be set as "application/json" as shown in the following image. MIME types are managed through your web server.