https://github.com/michaellf107/web-sockets
Example code of Websocket clients and servers, made with various frameworks and languages
https://github.com/michaellf107/web-sockets
nodejs python react svelte typescript vue websocket
Last synced: 2 months ago
JSON representation
Example code of Websocket clients and servers, made with various frameworks and languages
- Host: GitHub
- URL: https://github.com/michaellf107/web-sockets
- Owner: MichaelLF107
- Created: 2023-12-11T22:19:51.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-06T15:03:58.000Z (over 2 years ago)
- Last Synced: 2025-02-06T11:35:44.332Z (over 1 year ago)
- Topics: nodejs, python, react, svelte, typescript, vue, websocket
- Language: TypeScript
- Homepage:
- Size: 30.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Web Sockets
This repository contains projects for a simple Chat application, built with React, Vue and Svelte on the frontend, Typescript and Python on the backend
## Requirements
- Python 3
- Latest version of [Bun](https://bun.sh/)
## Installation
1. Clone this repository
```bash
git clone https://github.com/MichaelLF107/web-sockets.git
```
2. Install each project's dependencies
For a frontend project. (eg. React):
```bash
cd frontend/react
bun install
```
For backend (Typescript):
```bash
cd backend/javascript
bun install
```
For backend (Python):
```bash
python3 -m pip install websockets
```
## Usage
1. Start the frontend development server (eg. React)
```bash
cd frontend/react
bun run dev
```
2. Start the backend server:
Typescript:
```bash
cd backend/javascript
bun run index.ts
```
Python
```bash
cd backend/python
python3 main.py
```
3. Open `http://localhost:5173/` on your browser
The websocket will be running on `http://localhost:8080/`