diff options
author | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2020-02-26 20:14:21 -0500 |
---|---|---|
committer | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2020-02-26 20:14:21 -0500 |
commit | dc4fc3bda882f14fbaa2cd63f56c2216cc3374cd (patch) | |
tree | d004af217386f349a6451cd91eb5f83bd2ffe139 | |
parent | b17a844f2d1b20882f57b50d1b7ffd9940f90fb7 (diff) |
Add README and clean up dependencies
-rw-r--r-- | README.md | 27 | ||||
-rw-r--r-- | shell.nix | 1 |
2 files changed, 27 insertions, 1 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..50a4781 --- /dev/null +++ b/README.md @@ -0,0 +1,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> +``` @@ -6,7 +6,6 @@ pkgs.stdenv.mkDerivation { rustup clang openssl - sqlite pkgconfig postgresql ]; |