Skip to content

Lolner95/DS-COM

Repository files navigation

DS Chat Fresh-Clone Setup

This tutorial walks you through running the project from a new git clone.

Requirements

  • Node.js 18+
  • npm 9+

1) Clone the repository

git clone https://github.com/Lolner95/DS-COM
cd DS-COM

2) Install dependencies

This repo uses npm workspaces, so install once from the root:

npm install

3) Run in development

Starts both the client and the WebSocket server:

npm run dev

Open:

4) Configure the WebSocket URL (optional)

To point the client at a different WS endpoint, set VITE_WS_URL:

VITE_WS_URL=ws://localhost:8080 npm run dev

Production example:

VITE_WS_URL=wss://your-domain.com/ws npm run dev

When unset in production, the client uses ws(s)://<host>/ws.

5) Build for production

npm run build

Outputs:

  • Client build: client/dist
  • Server build: server/dist

6) Start the production server

npm run start

7) Serve the client in production

Serve client/dist from a static host (Nginx, Caddy, etc.).

Reverse proxy /ws to the Node WS server (default localhost:8080) so https://<host> works for both domain and IP.

8) Data persistence

Server data is stored here:

server/data/db.json

Make sure the server can write to server/data/. Delete the file to reset data.

9) Common issues

  • Port 8080 already in use: change PORT in server/src/index.ts, then rebuild.
  • Client not connecting: verify VITE_WS_URL or your /ws reverse proxy.

About

A simple chat for nostalgic folks that want back something like the MSN Messenger with a Nintendo DS style

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors