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
The [Node.js SDK reference](https://docs.powersync.com/client-sdk-references/node)
53
91
contains everything you need to know to get started implementing PowerSync in your project.
54
92
55
-
# Examples
93
+
##Examples
56
94
57
95
A simple example using `@powersync/node` is available in the [`demos/example-node/`](../demos/example-node) directory.
58
96
59
-
# Proxy Support
97
+
##Proxy Support
60
98
61
99
This SDK supports HTTP, HTTPS, and WebSocket proxies via environment variables.
62
100
63
-
## HTTP Connection Method
101
+
###HTTP Connection Method
64
102
65
103
Internally we probe the http environment variables and apply it to fetch requests ([undici](https://www.npmjs.com/package/undici/v/5.6.0))
66
104
67
105
- Set the `HTTPS_PROXY` or `HTTP_PROXY` environment variable to automatically route HTTP requests through a proxy.
68
106
69
-
## WEB Socket Connection Method
107
+
###WEB Socket Connection Method
70
108
71
109
Internally the [proxy-agent](https://www.npmjs.com/package/proxy-agent) dependency for WebSocket proxies, which has its own internal code for automatically picking up the appropriate environment variables:
72
110
73
111
- Set the `WS_PROXY` or `WSS_PROXY` environment variable to route the webocket connections through a proxy.
74
112
75
-
# Found a bug or need help?
113
+
## Encryption
114
+
115
+
This package can be used with the [`better-sqlite3-multiple-ciphers`](https://www.npmjs.com/package/better-sqlite3-multiple-ciphers) fork of `better-sqlite3` for encryption.
116
+
117
+
This requires a custom worker loading the forked package:
// Make sure the database is readable, this fails early if the key is wrong.
149
+
awaitdb.execute('pragma user_version');
150
+
}
151
+
},
152
+
logger
153
+
});
154
+
```
155
+
156
+
## Found a bug or need help?
76
157
77
158
- Join our [Discord server](https://discord.gg/powersync) where you can browse topics from our community, ask questions, share feedback, or just say hello :)
78
159
- Please open a [GitHub issue](https://github.com/powersync-ja/powersync-js/issues) when you come across a bug.
79
160
- Have feedback or an idea? [Submit an idea](https://roadmap.powersync.com/tabs/5-roadmap/submit-idea) via our public roadmap or [schedule a chat](https://calendly.com/powersync-product/powersync-chat) with someone from our product team.
80
161
81
-
# Thanks
162
+
##Thanks
82
163
83
164
The PowerSync Node.js SDK relies on the work contributors and maintainers have put into the upstream better-sqlite3 package.
84
165
In particular, we'd like to thank [@spinda](https://github.com/spinda) for contributing support for update, commit and rollback hooks!
0 commit comments