Update README.md
This commit is contained in:
@@ -18,42 +18,4 @@ files leave as downloads. **Nothing is written on the server**, and there is no
|
|||||||
endpoint that could write anything. That is what makes it safe to host without a
|
endpoint that could write anything. That is what makes it safe to host without a
|
||||||
login.
|
login.
|
||||||
|
|
||||||
Note this differs from the local development setup in the course folder, where
|
|
||||||
`edit_server.py` accepts `POST /__save` and writes sheets straight to disk. That
|
|
||||||
server is not deployed here, and must not be — reachable without a login it
|
|
||||||
would be a write primitive for anyone who could load the page.
|
|
||||||
|
|
||||||
## How it is served
|
|
||||||
|
|
||||||
`workshop/src/routes/projects/exercise-builder/app/[...file]/+server.ts` reads
|
|
||||||
this directory at request time. Consequences worth knowing:
|
|
||||||
|
|
||||||
- **Updating the builder does not need a site rebuild.** Sync new files here and
|
|
||||||
a reload picks them up (responses are `no-cache` with an mtime-based ETag).
|
|
||||||
A rebuild is only needed when the landing page or the route itself changes.
|
|
||||||
- Only recognised asset extensions are reachable, and paths are contained to
|
|
||||||
this directory — so nothing outside `app/` can be requested.
|
|
||||||
- `.js` is served as `text/javascript`, without which browsers refuse ES
|
|
||||||
modules outright.
|
|
||||||
- The route injects `<base href="/projects/exercise-builder/app/">` into the
|
|
||||||
served HTML, so the builder's relative URLs resolve whether or not the visitor
|
|
||||||
typed a trailing slash.
|
|
||||||
|
|
||||||
Override the location with `EXERCISE_BUILDER_ROOT` in the workshop `.env` if it
|
|
||||||
ever moves.
|
|
||||||
|
|
||||||
## Updating
|
|
||||||
|
|
||||||
Edit the files here. There is no build step and no sync — a reload picks the
|
|
||||||
change up, for the reasons above.
|
|
||||||
|
|
||||||
## Source of truth
|
|
||||||
|
|
||||||
**This directory.** The builder was developed in the BI122G course folder on
|
|
||||||
the workstation (`/Muspelheim/Employment/HiS/Teaching/BI122G`) and pushed here
|
|
||||||
by `deploy_builder.sh`. That arrangement has ended and this installation is now
|
|
||||||
canonical: **do not run `deploy_builder.sh` again**, as it would overwrite this
|
|
||||||
directory with the older course-folder copy.
|
|
||||||
|
|
||||||
The course folder still holds `test.mjs`, a Node test harness that was never
|
|
||||||
deployed here — it needs `linkedom` and is no use in a browser.
|
|
||||||
|
|||||||
Reference in New Issue
Block a user