-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
46 lines (37 loc) · 858 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
.PHONY : format install build
#Website/Restfull API
# for run server
run:
@echo "Running server..."
go run ./app/main.go
# for development
init:
@echo "Initializing dependencies..."
go mod init
go mod tidy
# for download dependencies
install:
@echo "Downloading dependencies..."
go mod download
# for format code
build:
@echo "building binary..."
go build ./app/main.go
# for start server
start:
@echo "Starting server..."
./app/main
swag:
@echo "Generating swagger docs..."
swag init -g ./app/main.go
swag-debug:
@echo "Generating swagger docs..."
swag init --parseDependency --parseInternal --parseDepth 2 -g app/main.go -d ./
# for clean binary
clean:
@echo "Cleaning..."
rm -rf ./app/main.exe
# live reload using nodemon: npm -g i nodemon
run-nodemon:
@echo "Running server with nodemon..."
nodemon --exec go run ./app/main.go