Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename @bufbuild/connect-core to @bufbuild/connect #473

Merged
merged 1 commit into from
Feb 17, 2023

Conversation

timostamm
Copy link
Member

@timostamm timostamm commented Feb 17, 2023

We are changing our approach with @bufbuild/connect-core after running some spikes with support for various web frameworks.

We are moving towards @bufbuild/connect being the single entry point for users, with platform- or framework-specific adapters imported from - for example - @bufbuild/connect-node.

This adds a new primitive to Connect for ES: ConnectRouter. It serves as a convenient and central place to register services or individual RPC implementations:

// connect.ts
import { ConnectRouter } from "@bufbuild/connect";

export default function(router: ConnectRouter) {
  // implement rpc Say(SayRequest) returns (SayResponse)
  router.rpc(ElizaService, ElizaService.methods.say, async (req) => ({
    sentence: `you said: ${req.sentence}`,
  }));
}

@timostamm timostamm merged commit 6f1d64b into main Feb 17, 2023
@timostamm timostamm deleted the tstamm/rename-pkg-connect-core branch February 17, 2023 21:46
@smaye81 smaye81 mentioned this pull request Feb 22, 2023
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