Self-hosting Stork

The simplest method of getting started with Stork is to load the Javascript from the Stork CDN. The Javascript library will load the WASM blob from the same CDN. The files will both be the latest version of the Stork library, and are guaranteed to work together. This simplifies integration: you don't have to host the script or the WASM binary, and you don't have to make sure to coordinate the version of the two.

However, loading an external script from a third-party CDN is not always ideal. To support users who want to self-host Stork, the Stork frontend lets you load the Javascript and WebAssembly from your own site.

  1. Download the matching JS/WASM files. Visit the latest Stork Release page on Github and download the Javascript and WASM build artifacts.

  2. Serve those files from your web server. Upload the Javascript and WASM files to your web server or web host and serve them publicly as you would a stylesheet or image.

    Make sure to serve the WASM file with the application/wasm MIME type. If you are putting these files behind your CDN, make sure to forward the Content-Type header from your file source, through that CDN.

  3. Initialize Stork on your webpage with your WASM's URL. The Advanced Javascript page describes the stork.initialize() method, which instructs Stork to load the WASM. Make sure you call this method -- even if you're using the simpler, stork.register() API -- before calling any other Stork methods:

<script src="https://your-url.com/stork.js"></script>
<script>
stork.initialize("https://your-url.com/stork.wasm")
stork.register("yourIndexName", "https://your-url.com/index-file.st")
</script>

© 2019–2021

Stork is built and shepherded by James Little, who's really excited that you're checking it out. If you have any questions or comments, feel free to tweet at him or open an issue on Github.

This site is open source. Please file a bug or open a PR if you see something confusing or incorrect. PRs are always welcome!

Logo by Bruno Monts. Please contact James Little before using the Stork logo. Thanks to Bruno and the fission.codes team for making this logo happen.