Main Content

Create Web App

Note

To create a web app, you need an installation of theMATLAB®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创建并运行一个简单的应用程序Using App Designer(MATLAB).

Steps to Package and Create a Web App

  1. TypewebAppCompilerat the MATLAB command line to open theWeb App Compiler应用程序。

  2. In theMAIN FILEsection of the toolstrip, click thebutton to add your App Designer.mlappfile to the project. The Web App Compiler automatically resizes to include an应用细节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 clickingEdit App Details. ClickRefreshto update Web App Compiler with any changes you have made.

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

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

  5. ClickPackageto package the app, and create a web app archive (.ctffile).

    In theSave Projectdialog 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 aPackagedialog box.

  6. Once packaging is complete, in thePackagedialog box, clickOpen 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 exactmccsyntax 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, seeDeploy Web App.

Related Topics