-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
30 lines (22 loc) · 830 Bytes
/
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
run: frontend api
api:
go run .
migrate:
go run github.com/prisma/prisma-client-go db push
clean:
# Delete DB if exists
@(sudo -H -u postgres bash -c 'psql -lqt | cut -d \| -f 1 | grep -qw dev') && (sudo -H -u postgres bash -c 'psql -U postgres -c "DROP DATABASE dev;"')
# Create DB for testing
-@(sudo -H -u postgres bash -c 'createdb dev')
psql:
sudo service postgresql start
redis:
sudo /etc/init.d/redis_6420 start
sudo /etc/init.d/redis_6421 start
kill:
@ps axf | grep "test dev 127.0.0.1" | grep -v grep | awk '{print "sudo kill " $$1}'
@ps axf | grep "test dev 127.0.0.1" | grep -v grep | awk '{print "sudo kill " $$1}' | bash
frontend: $(wildcard frontend/src/**/*.vue) $(wildcard frontend/src/**/*.js) $(wildcard frontend/src/**/*.css)
cd frontend && npm run build
serve:
cd frontend && npm run serve