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

How to use Y JS with dotnet as backend? #110

Open
bannarisoftwares opened this issue Jan 28, 2025 · 3 comments
Open

How to use Y JS with dotnet as backend? #110

bannarisoftwares opened this issue Jan 28, 2025 · 3 comments

Comments

@bannarisoftwares
Copy link

In my case I need a use react as a front and dotnet is a back end. I don't know how to use with this library. I am very new to the area. So can anyone please help me to get started.

@SebastianStehle
Copy link
Collaborator

Have you checked out the Demo, the client is actually a react app: https://github.com/y-crdt/ydotnet/tree/main/Demo/Client

@bannarisoftwares
Copy link
Author

bannarisoftwares commented Jan 28, 2025

Thank you so much for replying. Seems WebsocketProvider creates the local web server. Can you show me where the backend is integrated?

How the web socket provider hosted in dotnet application?
How web socket you are exposed in dotnet?
An implementation to how to set up Y JS backend server on.net? please 🥺

@SebastianStehle
Copy link
Collaborator

It is in the same project: https://github.com/y-crdt/ydotnet/tree/main/Demo

Basically you can either use one of these methods to "open" the endpoint:

  1. The middleware: https://github.com/y-crdt/ydotnet/blob/main/Demo/Program.cs#L83
  2. Return a ydotnet result in the controller: https://github.com/y-crdt/ydotnet/blob/main/Demo/Controllers/CollaborationController.cs#L11

ofc you also have to register all the services.

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

No branches or pull requests

2 participants