Skip to content

Commit

Permalink
squash!
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaRHristov committed Sep 30, 2023
1 parent f9f91f3 commit 3ad6263
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions Source/Function/Worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ export default <ExportedHandler<Environment>>{
const url = new URL(request.url);

if (url.pathname.startsWith("/functions/")) {
// const File = await import(url.pathname);
// console.log(process.cwd());
const File = await import(url.pathname);

// console.log((await import("fs")).readFile(url.pathname));
console.log(process.cwd());

console.log(await (await import("fs/promises")).readFile(File));

return new Response(url.pathname, {
headers: { "Content-Type": "text/html" },
Expand Down
2 changes: 1 addition & 1 deletion Target/Function/Worker.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3ad6263

Please sign in to comment.