-
Notifications
You must be signed in to change notification settings - Fork 2
/
example.sh
executable file
·43 lines (38 loc) · 978 Bytes
/
example.sh
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
41
42
43
#!/bin/bash
# Crypto provider.
echo "Running cryptoprovider..."
node src/cryptoprovider.js > cryptoprovider.log 2>&1 &
provider=$!
sleep 2
# Server
echo "Running server..."
echo "---------------------------"
echo "---------------------------"
echo "---------------------------"
node example/server.js 10 &
server=$!
sleep 2
# Ask user to open the browser.
echo "---------------------------"
echo "---------------------------"
echo "---------------------------"
echo ""
echo ""
echo ""
echo "Everything is running..."
echo "Open http://localhost:3000/ in your browser and follow the prompts"
echo "---------------------------"
echo "---------------------------"
echo "---------------------------"
wait $server
# Server is closed, kill crypto provider.
echo "---------------------------"
echo "---------------------------"
echo "---------------------------"
echo ""
echo ""
echo ""
echo "Server is done, killing crypto provider..."
kill $provider
wait $provider
echo "Done!"