Bairdy
Bairdy2y ago

Deno process watcher. How?

This code when compile, runs a simple http server.
import { serve } from "https://deno.land/std@0.178.0/http/server.ts";
serve((_req) => new Response("Hello, world"));
import { serve } from "https://deno.land/std@0.178.0/http/server.ts";
serve((_req) => new Response("Hello, world"));
Can a separate Deno script be used to watch this process running and if it crashes for whatever reason, it restarts? In Linux you can configure unit file for it but I was wondering if Deno is currently able to watch a different process and restart it if it has exited.
2 Replies
lucsoft
lucsoft2y ago
You could also while(true) { your deno command } Syntax may differ depending on shell
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View