From c1eeb3ccf06e9c012f3661356d5e2344127ba453 Mon Sep 17 00:00:00 2001 From: Josh Creek <8179928+jcreek@users.noreply.github.com> Date: Sun, 25 Jan 2026 19:24:47 +0000 Subject: [PATCH] docs(*): Update server readme for partykit --- src/server/README.md | 49 +++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 26 deletions(-) diff --git a/src/server/README.md b/src/server/README.md index 73a8d40..e6af333 100644 --- a/src/server/README.md +++ b/src/server/README.md @@ -1,34 +1,31 @@ -# Web Sockets Server +# Realtime Server (PartyKit) + +This folder contains the PartyKit server that powers realtime estimation. + +## Developing locally + +```bash +cd src/server +npm install +npx partykit dev +``` + +By default the PartyKit dev server runs on `localhost:1999`. The frontend connects to that host when `PUBLIC_PARTYKIT_HOST` is not set. ## Deploying -Use Docker to deploy this. +PartyKit manages the server deployment. From this folder: -Navigate to this folder and run `docker build -t estimation-ws-server .` to build the image. +```bash +cd src/server +npx partykit deploy +``` -Run it using `docker run -it --rm -p 8080:8080 estimation-ws-server` +You will be prompted to authenticate on first deploy. The PartyKit app name is defined in `partykit.json`. -## Deploying to Heroku +## Frontend configuration -### Install the Heroku CLI +Set the following env vars in Netlify: -Download and install the [Heroku CLI](https://devcenter.heroku.com/articles/heroku-command-line). - -If you haven't already, log in to your Heroku account and follow the prompts to create a new SSH public key. - -`heroku login` - -### Clone the repository - -Use Git to clone `your-app-name`'s source code to your local machine. - -`heroku git:clone -a your-app-name` -`cd your-app-name` - -### Deploy your changes - -Make some changes to the code you just cloned and deploy them to Heroku using Git. - -`git add .` -`git commit -am "Your commit message"` -`git push heroku main` \ No newline at end of file +- `PUBLIC_PARTYKIT_HOST`: the PartyKit host (for example `websocket-server-party.jcreek.partykit.dev`) +- `PUBLIC_PARTYKIT_PARTY`: optional party name (defaults to `main`)