-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
72 lines (58 loc) · 1.38 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
include .env
# Installing frontend dependencies
.PHONY: frontend-dep
frontend-dep:
cd frontend && npm install
# running the frontend
.PHONY: frontend-run
frontend-run:
cd frontend && npm start
# Lint the frontend source code
.PHONY: frontend-lint
frontend-lint:
cd frontend && npx eslint
# Installing backend dependencies
.PHONY: backend-dep
backend-dep:
cd backend/cmd/server && go get .
# Lint backend source code
.PHONY: backend-lint
backend-lint:
cd backend && golangci-lint run
# Format backend source code
.PHONY: backend-format
backend-format:
cd backend && go fmt ./...
# Run backend tests
.PHONY: backend-test
backend-test:
cd backend && go test -count=1 ./...
# Build the db
.PHONY: db-run
db-run:
cd backend && npx supabase start
# Stop the db
.PHONY: db-stop
db-stop:
cd backend && npx supabase stop
# Dump the db
.PHONY: db-dump
db-dump:
cd backend && npx supabase db dump --data-only
# Rebuild the database
.PHONY: db-rebuild
db-rebuild:
cd backend && npx supabase start && npx supabase db reset
# Run backend
.PHONY: backend-run
backend-run:
cd backend/cmd/server && go run main.go
# Build backend
.PHONY: backend-build
backend-build:
cd backend && go build -o bin/nightlife cmd/server/main.go
# convert the backend link to an ngrok link
.PHONY: backend-ngrok
backend-ngrok:
@echo ${EXPO_PUBLIC_API_DOMAIN}
cd backend && ngrok http --url=${EXPO_PUBLIC_API_DOMAIN} 8080