App Lab projects can be exported, so that the HTML, CSS, and JavaScript code can be used and edited outside the Code Studio environment. This allows teachers to start teaching with App Lab so students can quickly create apps and then graduate to more advanced features in a professional development environment.
Here’s how to export your app:
1. Go to the ‘Share’ button at the top left of App Lab.
2. Select ‘Show advanced options’ to bring up the ‘Export’ tab.
3. Select the export button.
This will download a zipped archive. Note that it will at be least 8MB in size. Here’s what’s in the zip file:
Once downloaded, you must unzip the archive and run a local testing server program in the directory the files were unzipped to. This article will guide you through that process. Once it is running, you can open your browser to the local URL, usually http://localhost:8000
.
You can edit these files locally with any text editor or modern development environment. You can also upload the files to your own web server or online web development environment.
Note: Previously, it was possible to run the project simply by opening the index.html file. Due to increased security restrictions in browsers, this is no longer possible and you must run a testing server program to open your project locally.
A note about databases and database APIs
This export process doesn't include any data tables you may have in your app in Code Studio. In addition, the App Lab database APIs are only available if the app is running in Code Studio. If you want to go further in your project, you can use your exported App Lab apps as a starting point to explore real databases and queries, such as MySQL. If you want to continue using your tables, you'll need to download them manually.