Refresh REDAME files + fix download_objects script
authorBenjamin Auder <benjamin.auder@somewhere>
Wed, 18 Mar 2020 20:16:29 +0000 (21:16 +0100)
committerBenjamin Auder <benjamin.auder@somewhere>
Wed, 18 Mar 2020 20:16:29 +0000 (21:16 +0100)
README.md
client/README.md
client/download_objects.sh [new file with mode: 0755]
download_objects.sh [deleted file]
server/README.md

index c92b145..a57c1c1 100644 (file)
--- a/README.md
+++ b/README.md
@@ -15,3 +15,7 @@ All contributions are welcome! For example,
 If you wanna help, you can contact me with the form on the website,
 so that we can discuss what to do and how :)
 If you feel comfortable with the code a pull request is a good start too.
+
+### Running the website locally
+
+Follow the instructions in server/README.md first, and then in client/README.md.
index 4a5c464..25bf68e 100644 (file)
@@ -1,27 +1,33 @@
 # vchess-client
 
 ## Project setup
-Rename and edit src/parameters.js.dist into parameters.js
+
+Rename and edit src/parameters.js.dist into parameters.js. Then:
 ```
+./download_objects.sh
 npm install
 ```
 
 ### Compiles and hot-reloads for development
+
 ```
 npm run serve
 ```
 
 ### Compiles and minifies for production
+
 ```
 npm run build
 ```
 
 ### Lints and fixes files
+
 ```
 npm run lint
 ```
 
 ### Customize configuration
+
 See [Configuration Reference](https://cli.vuejs.org/config/).
 
 ## Resources
diff --git a/client/download_objects.sh b/client/download_objects.sh
new file mode 100755 (executable)
index 0000000..a59fe32
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# Restore binary files (temporary fix - should use git-fat instead)
+for color in "w" "b"; do
+  for piece in "b" "c" "d" "e" "f" "g" "h" "j" "k" "m" "n" "o" "p" "q" "r" "s"; do
+    rm public/images/pieces/Eightpieces/tmp_png/"$color$piece".png
+    wget -q -O public/images/pieces/Eightpieces/tmp_png/"$color$piece".png https://vchess.club/images/pieces/Eightpieces/tmp_png/"$color$piece".png
+  done
+done
+rm public/sounds/newgame.flac
+wget -q -O public/sounds/newgame.flac https://vchess.club/sounds/newgame.flac
+rm public/favicon.ico
+wget -q -O public/favicon.ico https://vchess.club/favicon.ico
diff --git a/download_objects.sh b/download_objects.sh
deleted file mode 100755 (executable)
index 4768550..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-# Restore binary files (temporary fix - should use git-fat instead)
-rsync -a https://vchess.club/images/pieces/Eightpieces/tmp_png/ client/public/images/pieces/Eightpieces/tmp_png/
-scp https://vchess.club/sounds/newgame.flac client/public/sounds/
-scp https://vchess.club/favicon.ico client/public/
index 8fa2642..9adba7a 100644 (file)
@@ -1,15 +1,19 @@
 # vchess-server
 
-## Resources
+Instructions to run the server locally.
 
- - Node.js,
- - Express,
- - Other npm packages (see package.json),
+## Requirements
 
-## Installation (for developers)
+ - Node.js + npm (any recent version)
+ - SQLite (version 3)
 
- 0. Install git-fat https://github.com/jedbrown/git-fat
- 1. git fat init && git fat pull
- 2. Execute db/\*.sql scripts to create and fill db/vchess.sqlite
- 3. Rename and edit config/parameters.js.dist into parameters.js
- 4. npm i && npm start
+## Installation
+
+ 1. Execute db/\*.sql scripts to create and fill db/vchess.sqlite
+ 2. Rename and edit config/parameters.js.dist into parameters.js
+ 3. npm install
+
+Then run with the command
+```
+npm start
+```