From c38d877b94c6ac5df2de4c9c939ae683d733e8b8 Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Mon, 23 Jun 2025 22:45:18 -0400 Subject: Organize the developer docs into a "Pilcrow for Developers" book. The audience for this is developers looking to make changes to Pilcrow, either on the server, on the included client, or via its data model. Most of the material here is drawn from existing documents, but organized somewhat more coherently. I've left some space for client documentation, though no such documents exist yet. --- docs/developer/server/running.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 docs/developer/server/running.md (limited to 'docs/developer/server/running.md') diff --git a/docs/developer/server/running.md b/docs/developer/server/running.md new file mode 100644 index 0000000..27fdf4a --- /dev/null +++ b/docs/developer/server/running.md @@ -0,0 +1,35 @@ +# Running Pilcrow locally + +## Running a freestanding server + +Pilcrow can be run "as if" it were a real deployment using Cargo: + +```bash +cargo run +``` + +or + +```bash +cargo run --release +``` + +Cargo will build the server, and the UI if necessary, and package them together into a single binary. Options can be passed to the server using `cargo run -- […options…]`. + +## Running an editable client build + +It can be useful to run the client as a separate application during development. SvelteKit and Vite provide services such as live reloading that significantly streamline client development. To do this, start a local server (or see below), then separately start the client with Vite: + +```bash +npx vite dev +``` + +Vite will proxy API requests through to the running Pilcrow server, but provide its own view of the UI. + +Using the `tools/run` script will run both the Pilcrow server and a development client build. + +The client can also be run against other servers by setting the `API_SERVER` environment variable to the _base_ URL of the server: + +```bash +API_SERVER=https://hi.grimoire.ca/ npx vite run +``` -- cgit v1.2.3