Browse Source

Add help to Makefile

Makefile pretify
main
Дмитрий 2 years ago
parent
commit
b372ca119f
  1. 17
      Makefile
  2. 5
      readme.md

17
Makefile

@ -2,6 +2,8 @@
port := 5053
moc_server_address := 127.0.0.1:5059
bold := \033[1m
normal := \033[0m
run:
go run cmd/main.go -p $(port) -d "$(moc_server_address)"
@ -36,4 +38,17 @@ test-server:
go test
@$(MAKE) stop-moc-server
tests: test-server
tests:
@$(MAKE) test-server
help:
@echo "$(bold)Makefile commands$(normal)"
@echo "-----------------"
@echo "$(bold)make build$(normal) : will build the project"
@echo "$(bold)make tests$(normal) : run tests for the project"
@echo "$(bold)make run$(normal) : will run the project"
@echo ""
@echo "$(bold)OS commands$(normal)"
@echo "-----------"
@echo "start server at PORT with 'IP:PORT' list of partners:"
@echo "$(bold)./bin/simple-choose-ad -p PORT -d 'IP:PORT'$(normal)"

5
readme.md

@ -6,3 +6,8 @@ make build
./bin/simple-choose-ad -p PORT -d "IP:PORT"
```
где `PORT` это порт для входящих запросов, который слушает сервис, а `IP:PORT,IP2:PORT` список рекламных партнеров.
Также можно просмотреть help
```shell
make help
```

Loading…
Cancel
Save