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.
I didn't really use any resources other than the docs. One of the nice parts about Effect is that even though it can be the whole solution much of the time, you can also incrementally adopt it, which is what I did in my project until it eventually took over the entire back end.
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...