mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Move scripts to bin
This commit is contained in:
parent
ccfd23dfe5
commit
e7870ff368
@ -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.sh
|
||||
|
||||
Then 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 :)
|
||||
|
||||
|
8
bin/clean_test.sh
Executable file
8
bin/clean_test.sh
Executable file
@ -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"
|
||||
done
|
12
bin/run_servers.sh
Executable file
12
bin/run_servers.sh
Executable file
@ -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 &
|
Loading…
Reference in New Issue
Block a user