#!/usr/bin/env bash # The development server on http://127.0.0.1:8040 without login, with the # invented demo people and their documents, against the database of # scripts/dev-db.sh. The documents lie in .dev/ (git ignores it) under a file # key made on the first run. set -euo pipefail cd "$(dirname "$0")/.." export VISA_DATABASE_URL=${VISA_DATABASE_URL:-postgres://visa:visa-dev@127.0.0.1:55438/visa} export VISA_INSECURE_NO_LOGIN=1 export VISA_LISTEN=${VISA_LISTEN:-127.0.0.1:8040} mkdir -p .dev [ -s .dev/files.key ] || od -An -N32 -tx1 /dev/urandom | tr -d ' \n' > .dev/files.key # relative paths: a Windows build reads them the same export VISA_FILES_DIR=${VISA_FILES_DIR:-.dev/files} export VISA_FILES_KEY_FILE=${VISA_FILES_KEY_FILE:-.dev/files.key} cargo build -q ./target/debug/visa seed-demo exec ./target/debug/visa serve