Documentation

Create and Deploy a Web App

App Designer Prerequisite

Before you can 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).

Create a Web App

  1. Run webAppCompiler at the MATLAB command line.

  2. In the MAIN FILE section of the toolstrip, click the button to add your App Designer .mlapp file to the project.

  3. Specify the location of the app folder, specified by the MATLAB Web App Server, where you want the web app archive (.ctf file) to be automatically copied to (optional). If left empty, the Web App Compiler will create the web app archive (.ctf file) in the project folder. You will need to manually copy the web app archive (.ctf file) to the app folder specified by the server. For more information, see Configure MATLAB Web App Server.

  4. Edit web app information in the Web App Information section. Make sure to use a name that is easy to distinguish when your web app is deployed to the server. This name is visible on the web apps home page.

  5. Change the version number for tracking purposes (optional). The version number is visible on the web apps home page.

  6. Add a description for your web app in the Summary field (optional). This description is visible on the web apps home page.

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

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

    In the Save Project dialog box, specify the location to save the project.

  9. In the Package dialog box, select Open output folder when process completes.

    The Web App Compiler creates a log file PackagingLog.txt and two folders for_redistribution and for_testing that contain the web app archive file webAppArchiveName.ctf.

    for_redistributionfor_testing
    webAppArchiveName.ctfwebAppArchiveName.ctf
    readme.txtmccExcludedFiles.log
     readme.txt
     requiredMCRProducts.txt

    You can use the log file PackagingLog.txt to see the exact mcc syntax used to package and create the web app.

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

Deploy a Web App

  1. Navigate to the for_redistribution folder generated by the Web App Compiler during the packing process.

  2. Copy the file webAppArchiveName.ctf to the app folder specified by the MATLAB Web App Server.

    You can access the app folder by clicking Open App Folder button in the MATLAB Web App Server utility.

    Your web app is now deployed and can be accessed from the web apps home page. For more information, see Run a Web App.

Related Topics