File tree Expand file tree Collapse file tree 5 files changed +97
-1
lines changed Expand file tree Collapse file tree 5 files changed +97
-1
lines changed Original file line number Diff line number Diff line change 1+ root = " ."
2+ tmp_dir = " bin"
3+
4+ [build ]
5+ bin = " bin/main"
6+ cmd = " " # Prevent building, just restart the server
7+ log = " debug"
8+ include = [" *.go" ]
9+ exclude = [" tmp" , " vendor" ]
10+
11+ [color ]
12+ main = " yellow"
13+ watcher = " cyan"
14+ build = " green"
15+ log = " white"
File renamed without changes.
Original file line number Diff line number Diff line change 1+ # Binaries for programs and plugins
2+ * .exe
3+ * .exe~
4+ * .dll
5+ * .so
6+ * .dylib
17
2- dist /
8+ # Output of the go coverage tool, specifically when using LiteIDE
9+ * .out
10+
11+ # Dependency directories (remove the comment below if you use Go modules)
12+ vendor /
13+
14+ # Go workspace file
15+ go.work
16+ go.work.sum
17+
18+ # IDE/editor specific files
19+ .vscode /
20+ .idea /
21+ * .swp
22+
23+ # Environment variable file
24+ .env
25+
26+ # Ignore the tmp directory and all files inside it
27+ /tmp
Original file line number Diff line number Diff line change 11run :
22 @go build -o ./bin/main .
33 @./bin/main
4+
5+ # Simple Makefile for a Go project
6+
7+ # Build the application
8+ all : build test
9+
10+ build :
11+ @echo "Building..."
12+ @go build -o ./bin/main.go
13+
14+ # Run the application
15+ run :
16+ @echo "Running..."
17+ @go run ./bin/main.go
18+
19+ # Create DB container
20+ docker-run :
21+ @echo "Starting Docker container..."
22+ @$(if $(shell command -v docker compose 2>/dev/null), docker compose, docker-compose) up --build
23+
24+ # Shutdown DB container
25+ docker-down :
26+ @echo "Stopping Docker container..."
27+ @$(if $(shell command -v docker compose 2>/dev/null), docker compose, docker-compose) down
28+
29+ # Test the application
30+ test :
31+ @echo "Testing..."
32+ @go test ./... -v
33+
34+ # Clean the binary
35+ clean :
36+ @echo "Cleaning..."
37+ @rm -f ./bin/main
38+
39+ # Live Reload
40+ watch :
41+ @echo "Watching for changes..."
42+ @$(if $(shell command -v air 2>/dev/null), air, \
43+ $(if $(shell read -p "Go's 'air' is not installed. Do you want to install it? [Y/n] " choice; \
44+ [ "$$choice" != "n" ] && [ "$$choice" != "N" ]), \
45+ go install github.com/air-verse/air@latest && air, \
46+ echo "You chose not to install air. Exiting..." && exit 1))
47+
48+ .PHONY : all build run test clean watch docker-run docker-down
Original file line number Diff line number Diff line change @@ -51,6 +51,17 @@ Manaul✌️:
5151 go mod tidy
5252 go run main.go
5353```
54+ or- live refresh with air.
55+
56+ - install air
57+ ``` bash
58+ go install github.com/air-verse/air@latest
59+ ```
60+ - then run:
61+ ``` bash
62+ air
63+ ```
64+
54653-In root frontend directory you should run your next project
5566``` bash
5667 yarn install
You can’t perform that action at this time.
0 commit comments