You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Populate Table `name` values in `schema.props` for Schemas created with typed `Table`s. e.g. `schema.props['some_table'].name` will contain the table name.
Copy file name to clipboardExpand all lines: demos/example-electron-node/README.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,8 +9,9 @@ In particular:
9
9
queries. This worker is part of the `@powersync/node` package and wouldn't be copied into the resulting Electron
10
10
app by default. For this reason, this example has its own `src/main/worker.ts` loaded with `new URL('./worker.ts', import.meta.url)`.
11
11
2. In addition to the worker, PowerSync requires access to a SQLite extension providing sync functionality.
12
-
This file is also part of the `@powersync/node` package and called `powersync.dll`, `libpowersync.dylib` or
13
-
`libpowersync.so` depending on the operating system.
12
+
This file is also part of the `@powersync/node` package and is the prebuilt release asset (for example
13
+
`powersync_x64.dll`, `libpowersync_x64.dylib` or `libpowersync_x64.so`) depending on the operating system and
14
+
architecture.
14
15
We use the `copy-webpack-plugin` package to make sure a copy of that file is available to the main process,
15
16
and load it in the custom `src/main/worker.ts`.
16
17
3. The `get()` and `getAll()` methods are exposed to the renderer process with an IPC channel.
@@ -21,7 +22,7 @@ To see it in action:
21
22
2. Copy `.env.local.template` to `.env.local`, and complete the environment variables. You can generate a [temporary development token](https://docs.powersync.com/usage/installation/authentication-setup/development-tokens), or leave blank to test with local-only data.
22
23
The example works with the schema from the [PowerSync + Supabase tutorial](https://docs.powersync.com/integration-guides/supabase-+-powersync#supabase-powersync).
23
24
3.`cd` into this directory. In this mono-repo, you'll have to run `./node_modules/.bin/electron-rebuild` once to make sure `@powersync/better-sqlite3` was compiled with Electron's toolchain.
24
-
3. Finally, run `pnpm start`.
25
+
4. Finally, run `pnpm start`.
25
26
26
27
Apart from the build setup, this example is purposefully kept simple.
27
28
To make sure PowerSync is working, you can run `await powersync.get('SELECT powersync_rs_version()');` in the DevTools
0 commit comments