Skip to content

Commit

Permalink
test: add start server script
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenghaoz committed Nov 4, 2019
1 parent a0d1949 commit a8aca64
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/start_server.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
set -e

# Build executable
go install ../...

# Create temp files
TMP_DB=$(mktemp /tmp/test_server.XXXXXX)
TMP_CONFIG=$(mktemp /tmp/test_server.XXXXXX)

# Create config file
cp ../example/file_config/config.toml ${TMP_CONFIG}
sed -i "s:gorse.db:${TMP_DB}:g" ${TMP_CONFIG}

# Import ml-100k data
gorse import-feedback ${TMP_DB} ~/.gorse/dataset/ml-100k/u1.base --sep $'\t'

# Start server
gorse serve -c ${TMP_CONFIG}

0 comments on commit a8aca64

Please sign in to comment.