Skip to content

bitsacm/pollz-websocket

Repository files navigation

Pollz WebSocket Server (Go)

Prerequisites

⚠️ Note: Your system may support either docker-compose or docker compose.
Use the same consistently. Prepend sudo if you encounter permission errors.


Forking and cloning

Option 1: Clone All Repositories (recommended for full-stack setup)

  1. Fork the repositories on GitHub (backend, frontend, websocket) from the original organization:

  2. Clone your forks into a single pollz folder (replace <your-github-username> with yours):

    # Create a parent folder to keep all Pollz repos together
    mkdir pollz
    cd pollz
    
    # Clone backend
    git clone https://github.com/<your-github-username>/pollz-backend.git
    
    # Clone frontend
    git clone https://github.com/<your-github-username>/pollz-frontend.git
    
    # Clone websocket
    git clone https://github.com/<your-github-username>/pollz-websocket.git
    
  3. Add upstream remotes to fetch updates from the official repos:

    cd pollz-backend
    git remote add upstream https://github.com/bitsacm/pollz-backend.git
    cd ..
    
    cd pollz-frontend
    git remote add upstream https://github.com/bitsacm/pollz-frontend.git
    cd ..
    
    cd pollz-websocket
    git remote add upstream https://github.com/bitsacm/pollz-websocket.git
    cd ..

Option 2: Clone websocket Only

  1. Fork the repository on GitHub.

  2. Clone your fork (replace <your-github-username>):

    git clone https://github.com/<your-github-username>/pollz-websocket.git
    cd pollz-websocket
  3. (Optional but recommended for contributors) Add the original repo as upstream:

    git remote add upstream https://github.com/bitsacm/pollz-websocket.git
    git fetch upstream

Setup

  1. Install dependencies
go mod download
  1. Setup environment variables
cp .env.example .env
# Edit .env with your database credentials
  1. Run with Docker (Recommended)
docker-compose up --build

OR run locally:

# Ensure PostgreSQL and Redis are running
make run

Server will be available at ws://localhost:1401

WebSocket

  • ws://localhost:1401/ws/chat/live - Main chat WebSocket

About

No description, website, or topics provided.

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published