I created a run method to integrate Effect + SvelteKit a) takes an effect, effect fn, or a generator fn b) handles tagged errors, defects, and SvelteKit's `error` and `redirect` c) uses a custom logger to post logs to the console and the db d) returns directly to a loader, action, or remote function
Post
gist.github.comEffect + SveltekitEffect + Sveltekit. GitHub Gist: instantly share code, notes, and snippets.
For the docs, check out "Why Effect?", "The Effect Type", "Expected Errors", and "Managing Services" as a starting point to understanding the Effect flow. I might also make a blog post about how I integrated it with SvelteKit.
0 reposts1 like
Here are the main places where I've setup my SvelteKit integration: I setup most of the Effect code in `$lib/server/effect` github.com/sillvva/ddal... And added the managed runtime to `locals` so that it can be accessed by my custom `run` functions in `runtime.ts` github.com/sillvva/ddal...
Then the `run` and `runSafe` functions are used in remote functions and load functions. github.com/sillvva/ddal... github.com/sillvva/ddal...