-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathindex.html
28 lines (26 loc) · 957 Bytes
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
<title>Development server</title>
</head>
<body>
<p>
All exports from the surrealdb and @surrealdb/wasm packages are
assigned to the window, and under "surreal", a new Surreal instance
was created with the wasm engine already installed. You can play
around with it in the browser console!
</p>
<script type="module">
import * as surrealdb from "./node_modules/surrealdb/dist/index.bundled.mjs";
import * as wasm from "./dist/surreal/index.bundled.js";
if (typeof window !== "undefined") {
Object.assign(window, surrealdb);
Object.assign(window, wasm);
window.surreal = new Surreal({
engines: wasm.surrealdbWasmEngines(),
});
}
</script>
</body>
</html>