Skip to content

Commit

Permalink
Create watch_serve.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
EthanThatOneKid committed Dec 18, 2021
1 parent 0a1f91d commit db91aa5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions fart_server/watch_serve.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const makeWorker = () => {
const workerPath = new URL("./serve.ts", import.meta.url).href;
return new Worker(workerPath, { type: "module", deno: true })
};

const resetWorker = () => {
worker.terminate();
worker = makeWorker();
}

let worker = makeWorker();

for await (const event of Deno.watchFs(".")) {
console.log(">>>> event", event);
resetWorker();
}

1 comment on commit db91aa5

@deno-deploy
Copy link

@deno-deploy deno-deploy bot commented on db91aa5 Dec 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failed to deploy:

failed to fetch 'https://raw.githubusercontent.com/EthanThatOneKid/fart/db91aa5fda86ab66542d0941ef69935e8ed718d4/fart_server/handle_request.ts': HTTP status client error (404 Not Found) for url (https://raw.githubusercontent.com/EthanThatOneKid/fart/db91aa5fda86ab66542d0941ef69935e8ed718d4/fart_server/handle_request.ts)

Please sign in to comment.