Skip to content

Commit d0dc90c

Browse files
committed
test: improved local development
1 parent 83375b1 commit d0dc90c

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

.air.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build]
2+
cmd = "go build -o ./tmp/main cmd/backend.go"
3+
delay = 3000

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
tmp

CONTRIBUTING.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Contributions are welcome. Please note the [Code of Conduct](CODE_OF_CONDUCT.md)
44

55
## Tool & Repository setup
66

7+
### Recommendations
8+
79
CI pipelines check all code changes when you open a PR. To not have to go back and fix all issues manually, the following setup is recommended.
810

911
You will need the following tools:
@@ -23,6 +25,16 @@ go install github.com/fzipp/gocyclo/cmd/gocyclo@latest
2325
pre-commit install --hook-type commit-msg --hook-type pre-commit
2426
```
2527

28+
### Hot reload
29+
30+
If you want to hot reload the server, using `air` is recommended. Get it with
31+
32+
```sh
33+
go install github.com/cosmtrek/air@latest
34+
```
35+
36+
You can then run `air` in the repository root, which will build and rebuild the project every time the code changes.
37+
2638
## Commit messages
2739

2840
This project uses [Conventional commits](https://www.conventionalcommits.org/en/v1.0.0-beta.4/)

0 commit comments

Comments
 (0)