summaryrefslogtreecommitdiff
path: root/docs/developer/server/running.md
diff options
context:
space:
mode:
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
+```