Skip to content

Commit 8cae570

Browse files
committed
See if ?preset works to load experiment remotely
1 parent 7da9999 commit 8cae570

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

apps/class-solid/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,25 @@ If you add a preset the `src/lib/presets.ts` file needs to be updated.
6161

6262
An experiment from a preset can be opened from a url like `?preset=<preset-name>`.
6363
For example to load <src/lib/presets/death-valley.json> use `http://localhost:3000/?preset=Death%20Valley`.
64+
65+
## Loading experiments from url
66+
67+
A saved experiment can be loaded from a url with the `preset` search query parameter.
68+
69+
For example `https://classmodel.github.io/class-web?e=https://wildfiredataportal.eu/fire/batea/class.json` will load the experiment from `https://wildfiredataportal.eu/fire/batea/class.json`.
70+
71+
The server hosting the json file must have CORS enabled for this to work, see https://enable-cors.org/ for details.
72+
73+
<details>
74+
<summary>Local development</summary>
75+
76+
Besides the `pnpm dev` start a static web server hosting `apps/class-solid/src/lib/presets/` directory.
77+
78+
```shell
79+
# TODO
80+
```
81+
82+
83+
Visit http://localhost:3000/?preset=http://localhost:8080/death-valley.json .
84+
85+
</details>

0 commit comments

Comments
 (0)