From b9190487bdb6c5ba3956a5acd518b8d4677f2603 Mon Sep 17 00:00:00 2001 From: Tim Wundenberg Date: Fri, 23 Aug 2024 19:50:49 +0200 Subject: [PATCH] #109 add air for local development and update not found page --- .air.toml | 50 +++++++++++++++++++++++++++++++++++++++ .gitignore | 1 + templates/not_found.templ | 8 ++++++- 3 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 .air.toml diff --git a/.air.toml b/.air.toml new file mode 100644 index 0000000..d241399 --- /dev/null +++ b/.air.toml @@ -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 diff --git a/.gitignore b/.gitignore index cefa1cb..65f0206 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ secrets/ node_modules/ static/css/tailwind.css +tmp/ diff --git a/templates/not_found.templ b/templates/not_found.templ index 5b490fb..9ace173 100644 --- a/templates/not_found.templ +++ b/templates/not_found.templ @@ -1,5 +1,11 @@ package templates templ NotFound() { -

Not Found

+
+
+

Not Found

+

The page you are looking for does not exist.

+ Go back to home +
+
}