From 2379fffec5ab48dcac70e55f0019102b2d20f94b Mon Sep 17 00:00:00 2001 From: Hoang Nguyen Date: Fri, 21 Dec 2018 15:35:24 -0800 Subject: [PATCH 1/2] add auto rebuild/restart server on changes --- .bra.toml | 13 +++++++++++++ README.md | 7 +++++++ 2 files changed, 20 insertions(+) create mode 100644 .bra.toml diff --git a/.bra.toml b/.bra.toml new file mode 100644 index 0000000..2963010 --- /dev/null +++ b/.bra.toml @@ -0,0 +1,13 @@ +[run] +init_cmds = [["go", "build"], ["./blockform"]] +watch_all = true +watch_dirs = [ + "$WORKDIR/" +] +watch_exts = [".go"] +ignore = [".git"] + +# Minimal interval to Trigger build event +build_delay = 2000 + +cmds = [["go", "build"], ["./blockform"]] diff --git a/README.md b/README.md index dabecd1..cd6e1cd 100644 --- a/README.md +++ b/README.md @@ -74,3 +74,10 @@ Get, build and run: go get github.com/WeTrustPlatform/blockform cd $GOPATH/src/github.com/WeTrustPlatform/blockform go build && ./blockform + + +### Development +- (Optional) Auto rebuild and restart server when you make changes in `*.go` files using [bra](https://github.com/Unknwon/bra) + * `go get github.com/Unknwon/bra` + * `bra run` + * Happy coding From e9bf4b22ec82157129b56f4b86dbef2a94b24ff1 Mon Sep 17 00:00:00 2001 From: Hoang Nguyen Date: Wed, 2 Jan 2019 16:35:32 -0800 Subject: [PATCH 2/2] add watching html files --- .bra.toml | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.bra.toml b/.bra.toml index 2963010..1672c42 100644 --- a/.bra.toml +++ b/.bra.toml @@ -4,7 +4,7 @@ watch_all = true watch_dirs = [ "$WORKDIR/" ] -watch_exts = [".go"] +watch_exts = [".go", ".html"] ignore = [".git"] # Minimal interval to Trigger build event diff --git a/README.md b/README.md index cd6e1cd..098ef25 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ Get, build and run: ### Development -- (Optional) Auto rebuild and restart server when you make changes in `*.go` files using [bra](https://github.com/Unknwon/bra) +- (Optional) Use [bra](https://github.com/Unknwon/bra) to auto rebuild and restart server when you make changes in `*.go` and `*.html` files: * `go get github.com/Unknwon/bra` * `bra run` * Happy coding