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
|
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
||||||
.idea/
|
.idea/
|
||||||
go-sample-webpage
|
go-sample-webpage
|
||||||
webapp
|
webapp
|
||||||
|
tmp/
|
5
Makefile
5
Makefile
|
@ -4,4 +4,7 @@ build:
|
||||||
init-dev:
|
init-dev:
|
||||||
docker-compose up -d
|
docker-compose up -d
|
||||||
sleep 30
|
sleep 30
|
||||||
go run ./ migrate
|
go run ./ migrate
|
||||||
|
|
||||||
|
run-dev:
|
||||||
|
air
|
13
readme.md
13
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
|
Everything (include templaes and migration) can be added in one binary
|
||||||
|
|
||||||
## Make commands
|
## 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
|
# Dev
|
||||||
|
|
||||||
|
@ -41,7 +47,4 @@ Alles ist in einem binary
|
||||||
|
|
||||||
|
|
||||||
# next steps
|
# next steps
|
||||||
* conifg per env
|
* conifg per env
|
||||||
* makefile
|
|
||||||
* ci/Cd bis docker image bauen
|
|
||||||
* Hot reload while develop
|
|
|
@ -1,4 +1,4 @@
|
||||||
|
|
||||||
<h1>
|
<h1>
|
||||||
Hello {{ .title }}
|
Hello {{ .title }}!
|
||||||
</h1>
|
</h1>
|
||||||
|
|
Loading…
Reference in a new issue