Closed jkdoshi closed 1 year ago
Pocketbase exposes a hook API written and Go. Normally, other customizations must be written in Go and re-compiled. PBScript allows you to write hook handlers in Typescript or JavaScript instead of Go.
SvelteKit would do all the SSR handling. If you were to use the PocketBase js sdk client during an SSR request, that should work because the client will work in a node environment.
Did I understand your question correctly?
Closing this issue due to inactivity.
Thanks for starting
pbscript
. It's a great companion to pocketbase.My default strategy with pocketbase is to use SvelteKit frontend, and make it as static (JAMStack) as possible. But sometimes dynamic code at runtime is still needed. For example:
pbscript
(I think) would be useful in scenario #1, but perhaps not in scenario #2? Technically, SSR is still just script execution, but maybe I don't know enough about pbscript to see how it would work.Eventually, it would be nice to have a SvelteKit adapter that generates JS code that simply runs in pbscript.
PS: I put this in as an issue, since "discussions" feature is not turned on yet.