Skip to content

Conversation

coryhouse
Copy link
Contributor

There's no description in here for how to configure Zero to use server-mutators.ts, or the alternative filename I might prefer.

There's no description in here for how to configure Zero to use `server-mutators.ts`, or the alternative filename I might prefer.
Copy link

vercel bot commented Jul 17, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
zero-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 17, 2025 8:46pm

@aboodman
Copy link
Contributor

aboodman commented Jul 17, 2025 via email

@coryhouse
Copy link
Contributor Author

Is your reply corrupted? I don't see an image

@aboodman
Copy link
Contributor

Sorry should have known better than to reply by email.

CleanShot 2025-07-17 at 10 55 34@2x

I think maybe you missed this section:

https://zero.rocicorp.dev/docs/custom-mutators#setting-up-the-server

@coryhouse
Copy link
Contributor Author

Sorry, I was unclear. I mean here:

Screenshot 2025-07-17 at 5 14 51 PM

This shows how to use the same mutators on the client and server, which is great.

But later below, under Server Specific Code, I suggest enhancing this section to show how to configure Zero's push endpoint to use the server code. (I can't find an example of this in any of the example apps either).

Something like this:

app.post("/push", async (c) => {
  const result = await processor.process(createServerMutators(clientMutators), c.req.raw);
  return await c.json(result);
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants