A simple Chat App built using Rust, Actix-Web, Angular and Websockets.
Live Demo: https://that-ambuj-chat-app.shuttleapp.rs/
Tip: Open two or more browser windows to see realtime updates.
This project requires certain dependencies to be install in order to run this app.
- Rust - Install Rust's toolchain using rustup.rs
- Shuttle CLI - The backend uses Shuttle for deployment and hence require
cargo-shuttle
installed and logged in to run this app. Installcargo-shuttle
usingcargo install cargo-shuttle
orcargo-binstall cargo-shuttle
if you havecargo-binstall
installed. - Node.js and yarn - For managing and running the frontend and nx cli we are using node.js and yarn in this project. Install node.js from nodejs.org/en or your favourite package manger and enable yarn using
corepack enable
or refer to the docs - Cargo Watch(Optional) - For running the backend in dev mode. Can be installed using
cargo install cargo-watch
.
This repo is an nx based monorepo, so it contains all the frontend and backend code.
To run just the backend:
npx nx run backend
Open http://localhost:8000 in the browser to see the backend
To run both the frontend and backend in development(hot reload) mode, run the below commands in two seperate terminals:
npx nx dev backend
npx nx serve frontend
OR if you're using zsh then run both of them in parallel using:
npx nx dev backend & npx nx serve frontend
Open http://localhost:4200/ to see the frontend in dev mode.