A FeathersJS Chat Application
This repository includes the server application from the official Feathers chat guide as well as chat frontend examples for different frameworks.
The TypeScript version of the chat API server can be found in the feathers-chat-ts. To start it install the dependencies like this:
cd feathers-chat-ts
npm install
Then compile the source code and run the database migration which will initialize an SQLite database in the feathers-chat.sqlite file.
npm run compile
npm run migrate
It can now be started with:
npm start
Or in development mode with
npm run dev
Now go to http://localhost:3030 to start chatting 🕊️
A plain JavaScript frontend can be found in the public folder which is hosted statically by the api server examples.
The React example lives in the react-chat folder. It depends on the generated client package tarball that is built from the API project and installed locally from the filesystem.
Step 1 — Build and bundle the client from the API project:
cd feathers-chat-ts
npm install
npm run bundle:clientThis creates ../public/feathers-chat-0.0.0.tgz (relative to feathers-chat-ts).
Step 2 — Install dependencies and run the React app:
cd ../react-chat
npm install
npm startOpen 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):
cd feathers-chat-ts npm run dev # or: npm start
TBD