Publishing and Hosting
Once you've built your site, you have a number of options for hosting:
- Using ZapWork's integrated hosting
- Self-hosting on servers and a domain that you manage
ZapWorks provides an easy-to-use and robust hosting solution for your AR experiences as part of your subscription. To get started, head over to our content management system (CMS), my.zap.works.
Once you've logged in, you can create a new 'Universal AR' project using the + button.
Having created a 'Universal AR' project, head over to the "Experience" tab where you can either:
- upload a ZIP of your website directly
- find instructions for using the ZapWorks command-line tool to complete the upload.
When uploading a compressed .zip archive file of your website directly to your ZapWorks project you are required to add a version name when uploading to keep track of changes and versions of your experience.
Uploading your experience will add it to the project versions list. From here you can see the user, time and version, along with a download link of the .zip archive.
Uploading and publishing will make the current version of the experience live, allowing it to be accessed and launched by one of the chosen triggers. Click here to learn which trigger is best for your project.
The command-line interface (CLI) utility allows a range of tasks to be performed using the terminal. To learn more about the installation and usage of the CLI, we'd recommend first reading the ZapWorks CLI article.
To upload your experience from the CLI:
zapworks upload --version < e.g. 1.0.0 > --project < zw - project - id > <dir>
To publish your experience from the CLI:
zapworks publish --version < e.g. 1.0.0 > --project < zw - project - id >
Self hosting requires an enterprise plan. For more information, please get in touch with us.
If you'd like to self-host your content, there are a number of recommendations we make to ensure the best experience for end-users:
- You need to register your domain name with ZapWorks so that it passes the license check. For more information, head over to the Universal AR Licensing article
- You must serve the content over HTTPS (due to browser restrictions surrounding the camera)
- Files in the Zappar library ending with the
.wasmfile extension should be served with the
- Several files in this library (and likely others in your project too) compress well using
Content-Encoding: gzip. In particular you should serve files with the following extensions with gzip content-encoding:
In some cases (for testing), you want to start the experience without hosting it. In this case, you can start it by manually running the following command:
Due to browser restrictions surrounding the use of the camera, you must use HTTPS to view or preview your site, even if doing so locally from your computer. If you're using
webpack, consider using
webpack-dev-server which has an
https option to enable this.
Alternatively, you can use the ZapWorks command-line tool to serve a folder over HTTPS for access on your local computer, like this:
zapworks serve .
The command also lets you serve the folder for access by other devices on your local network, like this:
zapworks serve . --lan