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 build from source #55

Open
baiwfg2 opened this issue Dec 27, 2024 · 1 comment
Open

How to build from source #55

baiwfg2 opened this issue Dec 27, 2024 · 1 comment

Comments

@baiwfg2
Copy link

baiwfg2 commented Dec 27, 2024

Hi. I want to build from source. How to do that ?

@molvqingtai
Copy link
Owner

molvqingtai commented Jan 1, 2025

Assuming you already understand the front-end technology stack:

pnpm install

pnpm dev  // dev

pnpm run pack  // prod 

If you want to integrate into your own website:

  1. To change the app entry file(https://github.com/molvqingtai/WebChat/blob/master/src/app/content/index.tsx) to the form of a component, such as component/web-chat, you need to delete the browser plug-in-related code, that is, only keep the code in render
  2. Change the BrowserSyncStorageImpl storage implementation to your custom storage, as this storage implementation relies on the chrome plugin API, you can use localStorage or IndexDBStorage, or even store to the server instead, since the constraints are asynchronous
  3. Due to the instability of the P2P connection, it is recommended to use a custom server, such as websocket or a regular resful api, and just implement the constraints in externs/ChatRoom.ts & externs/VirtualRoom.ts in the impls folder, i.e., support the request method in the room on the server side

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