blob: 27fdf4a7f9c59c608922ccd0473e2f9c7e5de34e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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
```
|