This commit is contained in:
parent
37741ec415
commit
4c1e35e9e4
5 changed files with 47 additions and 8 deletions
32
.air.toml
Normal file
32
.air.toml
Normal file
|
@ -0,0 +1,32 @@
|
|||
root = "."
|
||||
tmp_dir = "tmp"
|
||||
|
||||
[build]
|
||||
bin = "./tmp/main run"
|
||||
cmd = "go build -o ./tmp/main ."
|
||||
delay = 1000
|
||||
exclude_dir = ["assets", "tmp", "vendor"]
|
||||
exclude_file = []
|
||||
exclude_regex = []
|
||||
exclude_unchanged = false
|
||||
follow_symlink = false
|
||||
full_bin = ""
|
||||
include_dir = []
|
||||
include_ext = ["go", "tpl", "tmpl", "html"]
|
||||
kill_delay = "0s"
|
||||
log = "build-errors.log"
|
||||
send_interrupt = false
|
||||
stop_on_error = true
|
||||
|
||||
[color]
|
||||
app = ""
|
||||
build = "yellow"
|
||||
main = "magenta"
|
||||
runner = "green"
|
||||
watcher = "cyan"
|
||||
|
||||
[log]
|
||||
time = false
|
||||
|
||||
[misc]
|
||||
clean_on_exit = false
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
|||
.idea/
|
||||
go-sample-webpage
|
||||
webapp
|
||||
tmp/
|
3
Makefile
3
Makefile
|
@ -5,3 +5,6 @@ init-dev:
|
|||
docker-compose up -d
|
||||
sleep 30
|
||||
go run ./ migrate
|
||||
|
||||
run-dev:
|
||||
air
|
11
readme.md
11
readme.md
|
@ -26,7 +26,13 @@ Its possitlbe to execute the migrations via `go run ./ migrate`. It execute the
|
|||
Everything (include templaes and migration) can be added in one binary
|
||||
|
||||
## Make commands
|
||||
*todo*
|
||||
* build -> Build webapp
|
||||
* init-dev -> Start docker copose
|
||||
* run-dev -> Run Webapp with reload if someting is change (air)
|
||||
|
||||
## Docker Image
|
||||
|
||||
https://hub.docker.com/r/kekskurse/go-sample-webpage
|
||||
|
||||
# Dev
|
||||
|
||||
|
@ -42,6 +48,3 @@ Alles ist in einem binary
|
|||
|
||||
# next steps
|
||||
* conifg per env
|
||||
* makefile
|
||||
* ci/Cd bis docker image bauen
|
||||
* Hot reload while develop
|
|
@ -1,4 +1,4 @@
|
|||
|
||||
<h1>
|
||||
Hello {{ .title }}
|
||||
Hello {{ .title }}!
|
||||
</h1>
|
||||
|
|
Loading…
Reference in a new issue