Main Content

Create Web App

Note

To create a web app, you need an installation of the MATLAB® Compiler™ product.

App Designer Prerequisite

Before you can package and then deploy a web app, you need to create an app using MATLAB App Designer. For more information, see Create and Run a Simple App Using App Designer (MATLAB).

Steps to Package and Create a Web App

  1. Type webAppCompiler at the MATLAB command line to open the Web App Compiler app.

  2. In the MAIN FILE section of the toolstrip, click the button to add your App Designer .mlapp file to the project. The Web App Compiler automatically resizes to include an App details section that contains information about the app such as app name, author, summary, description, and version. You can edit information about the app in App Designer by clicking Edit App Details. Click Refresh to update Web App Compiler with any changes you have made.

  3. (Optional) Select Copy web app to server app folder check box and specify the path to the app folder on the server where you want the web app archive (.ctf file) to be automatically copied. If you leave this check box cleared, the Web App Compiler will create the web app archive (.ctf file) in the project folder. You must manually copy or upload the web app archive (.ctf file) to the app folder on the server.

  4. Add supporting files, if any, in the Files required for your app to run section. Supporting files include any MAT-files, images used by your web app, or user-written MATLAB functions not found by MATLAB Compiler.

  5. Click Package to package the app, and create a web app archive (.ctf file).

    In the Save Project dialog box that opens, specify a project name and a location where you want to save the web app project. Web App Compiler saves your project and opens a Package dialog box.

  6. Once packaging is complete, in the Package dialog box, click Open output folder. This step opens the project folder which contains the following files:

    • webAppArchiveName.ctf

    • mccExcludedFiles.log

    • PackagingLog.html

    • requiredMCRProducts.txt

    You can view the log file, PackagingLog.html, to see the exact mcc syntax used to package and create the web app archive.

  7. To use the web app, deploy the web app archive file, webAppArchiveName.ctf. For more information, see Deploy Web App.

Compatibility Considerations

In most cases, you can generate a web app archive (.ctf file) on one platform and deploy to a server running on any other supported platform. Unless you add operating system-specific dependencies or content, such as MEX files or Simulink® simulations to your applications, the generated archives are platform-independent.

Related Topics