summaryrefslogtreecommitdiff
path: root/docs/developer/server/running.md
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2025-06-23 22:45:18 -0400
committerOwen Jacobson <owen@grimoire.ca>2025-07-01 20:25:30 -0400
commitc38d877b94c6ac5df2de4c9c939ae683d733e8b8 (patch)
treef8d02380dfef622656710b1412900eb21cc42656 /docs/developer/server/running.md
parentc0c825477e476d6d7331bfc409bceff9c376b484 (diff)
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.
Diffstat (limited to 'docs/developer/server/running.md')
-rw-r--r--docs/developer/server/running.md35
1 files changed, 35 insertions, 0 deletions
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
+```