Skip to content

Commit b21c06d

Browse files
mostlyerrorclaude
andauthored
Add dev server log capture and url helper script (#17)
Pipes dev server output to logs/dev.log for easier debugging and adds a quick `npm run url` command to grab the local dev URL. Gitignores the logs directory. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e2fa043 commit b21c06d

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,6 @@ next-env.d.ts
3838

3939
# Blog drafts (content managed in Sanity)
4040
blog-drafts/
41+
42+
# Dev logs
43+
logs/

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"version": "1.0.0",
44
"private": true,
55
"scripts": {
6-
"dev": "next dev",
6+
"dev": "mkdir -p logs && : > logs/dev.log && next dev 2>&1 | tee logs/dev.log",
7+
"url": "grep -m1 'http://localhost' logs/dev.log || echo 'Dev server not running. Run: npm run dev'",
78
"build": "mv app/redesign app/_redesign 2>/dev/null; next build; r=$?; mv app/_redesign app/redesign 2>/dev/null; exit $r",
89
"start": "next start",
910
"lint": "next lint",

0 commit comments

Comments
 (0)