Skip to content

Commit 0f3f016

Browse files
committed
update .gitignore to include .env and fix README to use pnpm, improve route.ts to handle optional tree.children
1 parent 9ffa199 commit 0f3f016

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,6 @@ yarn-error.log*
2727
/.next/
2828
/out/
2929

30-
**/public/sw.js
30+
**/public/sw.js
31+
32+
.env

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Run
22

3-
yarn dev
3+
pnpm dev
44

55
Runs the app in the development mode.
66

src/app/api/files/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const dirPath = process.env.FILES_PATH || "public/files"
88
export function GET() {
99
console.log("Looking for files")
1010
const tree = dirTree(dirPath, { attributes: ["size", "type", "extension"] })
11-
return NextResponse.json(tree.children)
11+
return NextResponse.json(tree?.children)
1212
}
1313

1414
export async function POST(request: NextRequest) {

0 commit comments

Comments
 (0)