From 2691ee2ee782a62860efd353bd7fb241efd30528 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Thu, 23 Apr 2020 23:55:44 +0200 Subject: [PATCH] fix: use relative path to files --- src/server.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/server.ts b/src/server.ts index ffe1af7..2086d5d 100644 --- a/src/server.ts +++ b/src/server.ts @@ -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`,