diff --git a/.air.toml b/.air.toml index 6df0633..80057ce 100644 --- a/.air.toml +++ b/.air.toml @@ -2,10 +2,15 @@ root = "." testdata_dir = "testdata" bin_dir = "bin" +[env] + PORT = "8080" + MARK1_CONFIG_PATH="etc/main.yaml" + [build] args_bin = [] bin = "./bin/server" - cmd = "dlv debug --headless --listen=:8080 --log --api-version=2 cmd/server/main.go" + cmd = "dlv debug --headless --listen=:8080 --log --api-version=2 --output=debug/__debug_bin cmd/server/main.go" + after = "rm -f debug/__debug_bin*" delay = 1000 exclude_dir = ["assets", "bin", "vendor", "testdata"] exclude_file = [] @@ -17,7 +22,6 @@ bin_dir = "bin" include_ext = ["go", "tpl", "tmpl", "html"] include_file = [] kill_delay = "0s" - log = "build-errors.log" poll = false poll_interval = 0 post_cmd = [] diff --git a/.gitignore b/.gitignore index 8064bc5..959e237 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ etc/main.yaml etc/.mark1 bin/ -__debug_* \ No newline at end of file +__debug_* +debug/ \ No newline at end of file diff --git a/Makefile b/Makefile index e23aacf..e707da8 100644 --- a/Makefile +++ b/Makefile @@ -33,5 +33,5 @@ update-readme: go-test: ./test/main.sh test -debug: +debug-server: dlv connect localhost:8080 diff --git a/cmd/server/main.go b/cmd/server/main.go index 291ecab..f946d37 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -13,6 +13,7 @@ func main() { panic(err) } + //hoge dbConnector := config.NewDBConnector() redisConnector := config.NewRedisConnector()