MCPcopy Create free account
hub / github.com/acoyfellow/UserDO / createPostEffect

Function createPostEffect

examples/effect/src/worker.ts:36–41  ·  view source on GitHub ↗
(stub: MyAppDO, title: string, content: string)

Source from the content-addressed store, hash-verified

34
35// Effect-based UserDO operations
36function createPostEffect(stub: MyAppDO, title: string, content: string) {
37 return Effect.tryPromise({
38 try: () => stub.createPost(title, content),
39 catch: (error: unknown) => new Error(`Failed to create post: ${error}`)
40 });
41}
42
43function listPostsEffect(stub: MyAppDO) {
44 return Effect.tryPromise({

Callers 1

fullFlowFunction · 0.85

Calls 1

createPostMethod · 0.45

Tested by

no test coverage detected