Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,31 @@ A plain JavaScript frontend can be found in the [public](./public/) folder which

### React

TBD
The React example lives in the [react-chat](./react-chat/) folder. It depends on the [generated client package tarball](https://feathersjs.com/guides/cli/client) that is built from the API project and installed locally from the filesystem.

Step 1 — Build and bundle the client from the API project:
```shell
cd feathers-chat-ts
npm install
npm run bundle:client
```
This creates `../public/feathers-chat-0.0.0.tgz` (relative to `feathers-chat-ts`).

Step 2 — Install dependencies and run the React app:
```shell
cd ../react-chat
npm install
npm start
```

Open http://localhost:3000 in your browser. The React app connects to the API at http://localhost:3030 via WebSockets.

Note:
- You still need to have the API running in a separate terminal for the app to work (WebSockets and REST at http://localhost:3030):
```shell
cd feathers-chat-ts
npm run dev # or: npm start
```

### VueJS

Expand Down
2 changes: 1 addition & 1 deletion react-chat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@types/node": "^16.18.11",
"@types/react": "^18.0.27",
"@types/react-dom": "^18.0.10",
"feathers-chat": "http://localhost:3030/feathers-chat-0.0.0.tgz",
"feathers-chat": "file:../public/feathers-chat-0.0.0.tgz",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
Expand Down