Deno Deploy

DinoSsr is an experimental work in progress and subject to change!

DinoSsr can be deployed to Deno Deploy with a few limitations.

DinoSsr compiles and bundles all Svelte routes when the server starts up. On Deno Deploy advanced routes are also bundled due to lack of true dynamic imports. If you need 3rd party libraries use middleware routes instead as they are not bundled.

Prebuilt Bundles

The Deno server can take a few seconds to start up. Exact time depends on route size and CPU power. However, it will likely be too slow on Deno Deploy where isolates are shut down and started up on request.

Bundles can be built and published before deployment allowing for near instant start up. This is done setting the DINOSSR_BUILD environment variable.

This can be done with a GitHub Action for example:

  - name: Clone Repo
    uses: actions/checkout@v4
  - name: Setup Deno
    uses: denoland/setup-deno@v1
      deno-version: vx.x.x
  - name: Build
    run: DINOSSR_BUILD=1 DINOSSR_DEPLOY_ID=${{ github.run_id }} deno run -A mod.ts
  - name: Deploy
    uses: denoland/deployctl@v1
      project: dinossr
      entrypoint: mod.ts

This is not necessary for a normal Deno server unless it is very low powered.