New feature: Export your App Lab code!
May 2023: Click HERE for updated article about exporting your App Lab program.
App Lab is a programming environment where you can design simple apps with code blocks or JavaScript, then share your apps with others. We designed App Lab as a starting point for app creation. It’s a tool in our CS Principles course, but it’s used much more broadly—in classrooms or just for fun.
Many students and teachers have requested the ability to export App Lab creations so that the HTML, CSS, and JavaScript 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. We’re excited to share that this feature is now live in App Lab!
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 least 8MB in size. Here’s what’s in the zip file:
Once you export your app, click on the ‘index.html’ file to open your app on your browser. Your app should now be running locally on your computer! 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.
A note about database APIs
The App Lab database APIs are only available if the app is running in Code Studio. If you want to go further in your courses, you can use your exported App Lab apps as a starting point to teach more complex databases and queries such as MySQL.
We wanted to let you know about the export feature so you can experiment beyond what’s available in App Lab and give us feedback about what you’d like to see in the future. As always, we’d love to hear what you think — just email us at support@code.org!
- Josh Schulte, Support Program Manager at Code.org