-
Notifications
You must be signed in to change notification settings - Fork 58
Add electron example using Node.JS SDK in main process #534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
This adds a small example using the Node.JS SDK in the main process of an element application. To expose database functionality, we inject
get()
,watch()
and the status stream into renderer processes using IPC channels created in the preload script.To exercise the new CommonJS compilation of our Node SDK, the new demo uses webpack to compile everything into a CommonJS module. It also sets up the build to:
libpowersync.dylib
(or the platform-specific alternative name) into the JavaScript assets for the main process.