#109 add air for local development and update not found page
Some checks failed
Build Docker Image / Explore-Gitea-Actions (push) Failing after 5s

This commit is contained in:
Tim Wundenberg
2024-08-23 19:50:49 +02:00
parent 6216bd56b6
commit b9190487bd
3 changed files with 58 additions and 1 deletions

50
.air.toml Normal file
View File

@@ -0,0 +1,50 @@
root = "."
tmp_dir = "tmp"
[build]
args_bin = []
bin = "/bin/bash -c 'FRONTEND_URL=xxx ./tmp/main'"
cmd = "templ generate && go build -o ./tmp/main ."
delay = 1000
exclude_dir = ["static", "migrations", "node_modules", "tmp"]
exclude_file = []
exclude_regex = ["_test.go", "_templ.go"]
exclude_unchanged = false
follow_symlink = false
full_bin = ""
include_dir = []
include_ext = ["go", "templ", "html"]
include_file = []
kill_delay = "0s"
log = "build-errors.log"
poll = false
poll_interval = 0
post_cmd = []
pre_cmd = []
rerun = false
rerun_delay = 500
send_interrupt = false
stop_on_error = false
[color]
app = ""
build = "yellow"
main = "magenta"
runner = "green"
watcher = "cyan"
[log]
main_only = false
time = false
[misc]
clean_on_exit = false
[proxy]
app_port = 0
enabled = false
proxy_port = 0
[screen]
clear_on_rebuild = false
keep_scroll = true

1
.gitignore vendored
View File

@@ -30,3 +30,4 @@ secrets/
node_modules/
static/css/tailwind.css
tmp/

View File

@@ -1,5 +1,11 @@
package templates
templ NotFound() {
<h1 class="text-red-200">Not Found</h1>
<main class="flex h-full justify-center items-center ">
<div class="bg-error p-16 rounded-lg">
<h1 class="text-4xl text-error-content mb-5">Not Found</h1>
<p class="text-lg text-error-content mb-5">The page you are looking for does not exist.</p>
<a href="/" class="btn btn-lg btn-primary">Go back to home</a>
</div>
</main>
}