What is the output of this Deno server health check endpoint when the server is running normally?
import { serve } from "https://deno.land/std@0.177.0/http/server.ts"; serve((req) => { if (new URL(req.url).pathname === "/health") { return new Response(JSON.stringify({ status: "ok" }), { status: 200, headers: { "Content-Type": "application/json" }, }); } return new Response("Not Found", { status: 404 }); });
Check the response body when the path is /health.
The health check endpoint returns a JSON with {"status":"ok"} and HTTP status 200 when accessed at /health.
Which option best describes the main purpose of health checks in a DevOps environment?
Think about what health checks tell you about your app.
Health checks confirm the app is alive and responding, which helps automated systems decide if the app needs restarting or replacement.
You have a Deno app with a health check endpoint that suddenly returns HTTP 500 errors. Which of these is the most likely cause?
HTTP 500 means server error, not client or path error.
HTTP 500 errors indicate the server code handling the health check is failing, often due to exceptions or crashes.
Which sequence correctly describes a continuous monitoring workflow for a Deno app's health check?
Think about the logical order of sending request, parsing, checking, then alerting.
The monitoring system sends a request, parses the response, checks the status, and alerts if needed.
Which option is the best practice for implementing a health check endpoint in a Deno application?
Health checks should be fast and lightweight.
Health checks should respond quickly with minimal processing to reliably indicate app health without causing delays.
