aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Harley2018-07-09 13:29:58 +0100
committerTom Harley2018-07-09 13:29:58 +0100
commit6dee9e0aa671b292fae0d4eeb9fc2343b00d6a77 (patch)
tree9f27f522ee4789bc819520f84c5318cdea34a555
parentdisgusting hotfix (diff)
downloadmedicine-6dee9e0aa671b292fae0d4eeb9fc2343b00d6a77.tar.gz
medicine-6dee9e0aa671b292fae0d4eeb9fc2343b00d6a77.zip

Made more useful build/run scripts and instruction

-rw-r--r--README.md33
-rw-r--r--dump.rdbbin92 -> 0 bytes
-rwxr-xr-xgetmepostgres.sh2
-rwxr-xr-xrunmepostgres.sh2
-rwxr-xr-xrunmeredis.sh2
5 files changed, 19 insertions, 20 deletions
diff --git a/README.md b/README.md
index 6fa092d..54a2878 100644
--- a/README.md
+++ b/README.md
@@ -1,27 +1,26 @@
# README
-## Instructions to install:
+## Installing
-$ ./getmeall.sh
-$ yarn
+This server has a number of dependencies. A shell script has been supplied to
+automatically fetch these resources; running `getmeall.sh` should fetch all
+required resources, and build them inside the project folder. If you already
+have some of these resources installed on your system, comment out the
+appropriate line in `getmeall.sh`.
-## Instructions to run postgres & cacheing:
+## Running
+Both PostGres and Redis will need to be running before the server is started:
+```
$ ./runmepostgres.sh
$ ./runmeredis.sh
+```
+Then, the server itself can be run with `yarn start`. Alternatively, to run in
+single-instance mode (recommended for testing), use `yarn local`.
-## Instructions to run server:
+To monitor a `yarn start`ed server, use `yarn console`.
-$ yarn start
+To stop a `yarn start`ed server, use `yarn stop`.
-### Instructions to monitor server
-
-$ yarn console
-
-### Instructions to stop server
-
-$ yarn stop
-
-## To test:
-
-$ yarn test
+To run tests on the server, use `yarn test`. Specific tests can be run using
+other `yarn` tasks listed in `package.json`.
diff --git a/dump.rdb b/dump.rdb
deleted file mode 100644
index 4439e12..0000000
--- a/dump.rdb
+++ /dev/null
Binary files differ
diff --git a/getmepostgres.sh b/getmepostgres.sh
index 035b300..bd8fffd 100755
--- a/getmepostgres.sh
+++ b/getmepostgres.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-PGDIR=${1-"$HOME/pg"}
+PGDIR=${1-"$PWD/pg"}
echo "> Checking for postgres at $PGDIR";
if [ -d "$PGDIR" ]; then
diff --git a/runmepostgres.sh b/runmepostgres.sh
index d049a8e..9eee307 100755
--- a/runmepostgres.sh
+++ b/runmepostgres.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-PGDIR=${1-"$HOME/pg"}
+PGDIR=${1-"$PWD/pg"}
# read -p "Press [Enter] key to start Postgres (will already be running if you just got it) use ctl+c to cancel";
echo "> Starting Server";
diff --git a/runmeredis.sh b/runmeredis.sh
index 5d3915a..95bbf15 100755
--- a/runmeredis.sh
+++ b/runmeredis.sh
@@ -1,3 +1,3 @@
#!/bin/sh
-./redis-stable/src/redis-server redis-stable/redis.conf &
+./redis-stable/src/redis-server redis-stable/redis.conf --daemonize yes