-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·40 lines (27 loc) · 806 Bytes
/
test.sh
File metadata and controls
executable file
·40 lines (27 loc) · 806 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
set -e
echo "Info: using node version `node --version`"
mkdir -p /tmp/devmontest
cp -r initialApp/* /tmp/devmontest
pushd /tmp/devmontest
npm install connect
popd
node devmon.js /tmp/devmontest &
PID=$!
sleep 3s
echo -e "\nFor this test, please add the following to your /etc/hosts file, mapped to 127.0.0.1:"
echo " example.com"
echo " devmon.example.com"
echo -e "\nYou should see Hello world at example.com:5000."
echo -e "\nPress enter to test code updates."
read nothing
echo -e "\nTarring and sending new app."
pushd testApp
tar -cvf ../test.tar .
popd
curl -X POST -F code=@test.tar http://devmon.example.com:5000/__update_code__
echo -e "\nYou should see New kid on the block at example.com:5000."
echo -e "\nPress enter to exit."
read nothing
kill -2 $PID
wait $PID