ActivityPub-federated video streaming platform using P2P directly in your web browser
Move scripts to bin
Chocobozzze7870ff36825
diff --git a/README.md b/README.mdindex 0477f34859..8cae42aab5 100644--- a/README.md+++ b/README.md@@ -76,8 +76,8 @@ Install NodeJS 4.2: [https://nodejs.org/en/download/package-manager/#debian-and-### Test with 3 fresh nodes- $ scripts/clean_test.sh- $ scripts/run_servers.sh+ $ bin/clean_test.sh+ $ bin/run_servers.shThen you will can access to the three nodes at `http://localhost:900{1,2,3}`. If you call "make friends" on `http://localhost:9002`, the pod 2 and 3 will become friends. Then if you call "make friends" on `http://localhost:9001` it will become friend with the pod 2 and 3 (check the configuration files). Then the pod will communicate with each others. If you add a video on the pod 3 you'll can see it on the pod 1 and 2 :)diff --git a/bin/clean_test.sh b/bin/clean_test.shnew file mode 100755index 0000000000..ef146e0916--- /dev/null+++ b/bin/clean_test.sh@@ -0,0 +1,8 @@+#!/bin/bash++basePath=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )++for i in $(seq 1 6); do+ printf "use peertube-test%s;\ndb.dropDatabase();" "$i" | mongo+ rm -rf "$basePath/../test$i"+donediff --git a/bin/run_servers.sh b/bin/run_servers.shnew file mode 100755index 0000000000..83768178c0--- /dev/null+++ b/bin/run_servers.sh@@ -0,0 +1,12 @@+#!/bin/bash++if [ ! -f server.js ]; then+ echo "The script has to be executed at the root of the project."+ exit -1+fi++NODE_ENV=test NODE_APP_INSTANCE=1 node server.js &+sleep 1+NODE_ENV=test NODE_APP_INSTANCE=2 node server.js &+sleep 1+NODE_ENV=test NODE_APP_INSTANCE=3 node server.js &