12 lines
440 B
Bash
Executable File
12 lines
440 B
Bash
Executable File
#!/bin/sh
|
|
# Builds the program and runs it against a throwaway copy of the database on port 1612.
|
|
# Reads page/script edits from assets/ each time (loads them into the copy).
|
|
set -e
|
|
cd "$(dirname "$0")/.."
|
|
make build
|
|
dir=$(mktemp -d "${TMPDIR:-/var/tmp}/kjv-test.XXXXXX")
|
|
cp db/kjv.db "$dir/kjv.db"
|
|
bin/kjv-api import-assets -db "$dir/kjv.db" assets
|
|
echo "test database: $dir/kjv.db"
|
|
exec bin/kjv-api -db "$dir/kjv.db" -addr 127.0.0.1:1612
|