-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
57 lines (44 loc) · 1.25 KB
/
Makefile
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
ss:
# --- SERVER SIDE ---
# npm install
@if [ -d "server/node_modules" ]; then \
echo "[server] Node modules is exist"; \
else \
echo "Installing node_modules..."; \
cd server && npm install; \
fi
# start database
mkdir -p server/data/imported
mkdir -p server/data/images
mkdir -p server/data/postgresql
chmod 777 server/.env
docker-compose down;
docker-compose up -d dms-postgresql;
until nc -z -v -w30 localhost 5432; do echo "Waiting for postgresql..."; sleep 5; done
@echo "Database started..."
# npm run dev
npm run dev --prefix ./server
@echo "[step 1] Server is running...";
cs:
# --- CLIENT SIDE ---
# npm install
@if [ -d "client/node_modules" ]; then \
echo "[client] Node modules is exist"; \
else \
echo "Installing node_modules..."; \
cd client && npm install; \
fi
# npm run start
npm run start --prefix ./client
@echo "[step 2] Client is running...";
kill:
@echo "Killing all...";
npx kill-port 3000
npx kill-port 8000
all:
# server side
@echo "[1] Starting shelter-gateway"
@osascript -e 'tell app "Terminal" to do script "cd $(CURDIR) && make ss"'
# client side
@echo "[2] Starting shelter-accounts"
@osascript -e 'tell app "Terminal" to do script "cd $(CURDIR) && make cs"'