summaryrefslogtreecommitdiff
path: root/README.md
blob: b327372e3170d1952b3e55485ab5ad738a4f384b (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
# Building

Rust nightly is required due to the rocket dependency. Other dependencies
are listed in `shell.nix`.

If using rustup, use `rustup override nightly` to use the nightly toolchain in
this directory.

Build using `cargo build`.

# Initial Setup

Some configuration needs to be populated in the database using the `init`
command.

```bash
# A postgresql url, e.g., for my_database over a default local socket:
DB_URL=postgres://my_user@/my_database

# Key used by rocket.rs to encrypt client-side login tokens.
ROCKET_SECRET_KEY=openssl rand -base64 32

cargo run -- --database_url $DB_URL \
  init --rocket_secret_key $ROCKET_SECRET_KEY \
  --strava-client-id <client id from strava>
  --strava-client-secret <client secret from strava>
```