Skip to content
This repository has been archived by the owner on Oct 6, 2020. It is now read-only.

Commit

Permalink
fix: use relative path to files
Browse files Browse the repository at this point in the history
  • Loading branch information
coderbyheart committed Apr 23, 2020
1 parent 95cd5eb commit 2691ee2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ export const requestHandler = (hostname: string) => async (
const folders = request.url?.substr(1).split('/') ?? []
const fileName = folders.shift()
const f = path.join(
process.cwd(),
__dirname,
'..',
'sandbox',
...folders,
`${fileName}.json`,
Expand Down

0 comments on commit 2691ee2

Please sign in to comment.