RunestoneInteractive / RunestoneInteractive/rs

Should SQL-WASM file location be root relative?

Open
#584 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
69
Forks
117
Avg merge
6d 4h
Merged PRs (30d)
24

Description

When not serving from Runestone, the path that gets build for sql-wasm.wasm URL starts with the string "/_static". Thus SQL-wasm needs to be at the root level of the server in a directory named _static, not in the _static folder that is part of the book build.

For someone self-hosting a book on a server they do not own, that might be impossible.

Example:
Load https://pretextbook.org/examples/sample-book/noparts/html/activecode.html

You get:
image

@moisedk - if you are looking for small issues, this one should be pretty quick. The build process is already putting sql-wasm-wasm in the book folder, the code is just not looking in the right place for that file.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the sql-wasm.wasm URL is constructed when serving the sample book outside Runestone, then compare it with the book build's _static output. Verify the change using the linked activecode.html example and confirm that self-hosted books load the file from their own _static directory.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, wasm
Domain
build-system, web-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.