Skip to content

Commit 2fa26f8

Browse files
committed
Create new Claude hook that ensure pnpm run dev is running
1 parent 5f7573b commit 2fa26f8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.claude/settings.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@
1616
},
1717
"includeCoAuthoredBy": false,
1818
"hooks": {
19+
"UserPromptSubmit": [
20+
{
21+
"hooks": [
22+
{
23+
"type": "command",
24+
"command": "if ! curl -s --connect-timeout 1 http://localhost:8102 >/dev/null 2>&1; then echo -e '\\n\\n\\033[1;31mCannot reach backend on port 8102! Please run `pnpm run dev` before querying Claude Code\\033[0m\\n\\n' >&2; exit 2; fi"
25+
}
26+
]
27+
}
28+
],
1929
"PostToolUse": [
2030
{
2131
"matcher": "Edit|MultiEdit|Write",

0 commit comments

Comments
 (0)