-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathssr.sh
32 lines (19 loc) · 877 Bytes
/
ssr.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
#!/bin/bash
cd client
echo "================================= Remove build dir client ==================================="
rm -rf build
echo "==================================== Start build client ====================================="
yarn build
cd ..
echo "======================================== Build done! ========================================="
echo "============================== Cp build client to server static =============================="
cd server
echo "================================== Remove build dir server ===================================="
rm -rf build
cd ..
cp -r client/build server/build
echo "=========================================== Done! ============================================"
echo "======================================= Starting SSR! ========================================"
cd server
npx kill-port 5000
yarn dev