-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
48 lines (36 loc) · 971 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
47
48
docker:
sudo systemctl start docker
compose-up:
sudo docker-compose up --build
deps:
echo "starting rethinkdb image (version 2.4.0) and redis image (version 5.0.7)"
docker run -p 28015:28015 -p 8080:8080 -d rethinkdb:2.4.0
docker run -p 6379:6379 -d redis:5.0.7
be-lint:
echo "running linters"
golangci-lint run ./...
be-fmt:
echo "formatting go code"
gofmt -w .
be-test:
echo "running backend tests"
go mod tidy
go test ./... -cover
be-run: export SERVER_PORT=7070
be-run: export SERVER_HOST=0.0.0.0
be-run: export DATABASE_NAME=chat
be-run: export DATABASE_HOST=localhost
be-run: export DATABASE_PORT=28015
be-run: export STATICS_PATH=static
be-run: export SESSION_DB_NAME=0
be-run: export SESSION_DB_PASSWORD=
be-run: export SESSION_DB_HOST=localhost
be-run: export SESSION_DB_PORT=6379
be-run:
echo "running backend"
go mod tidy
go run cmd/chat/main.go
be-all: be-fmt be-test be-run
lint:
echo "running linters"
golangci-lint run ./...