From 522e77766a242689e4c57c3bf8abfed1f81b062d Mon Sep 17 00:00:00 2001 From: Florian Hoss Date: Tue, 26 Mar 2024 10:25:19 +0100 Subject: [PATCH] Add debugger service --- .vscode/launch.json | 13 +++++++++++ README.md | 3 ++- components/user.templ | 2 +- compose.yml | 46 ++++++++++++++++++++++++++++++++++----- handlers/app.handlers.go | 8 ++++++- handlers/auth.handlers.go | 13 ----------- scripts/debug.sh | 4 ++++ views/home/home.templ | 2 +- 8 files changed, 68 insertions(+), 23 deletions(-) create mode 100644 .vscode/launch.json create mode 100755 scripts/debug.sh diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..cf198a1 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,13 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Debug golang", + "type": "go", + "request": "attach", + "mode": "remote", + "port": 4001, + "host": "127.0.0.1" + } + ] +} diff --git a/README.md b/README.md index aee9cff..917309f 100644 --- a/README.md +++ b/README.md @@ -2,5 +2,6 @@ ```sh docker compose run --rm node yarn install -docker compose up --build +docker compose --profile dev up --build +docker compose --profile debug up --build ``` diff --git a/components/user.templ b/components/user.templ index 899ee49..f008778 100644 --- a/components/user.templ +++ b/components/user.templ @@ -4,7 +4,7 @@ import ( "github.com/logto-io/go/core" ) -templ User(user *core.UserInfoResponse) { +templ User(user core.UserInfoResponse) {
@components.Weather(weather)