From a94ca7fd03324aa4e1d2cdf0f7edeb9e7fdf36d4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 3 Mar 2026 07:40:37 +0000 Subject: [PATCH 1/2] Initial plan From 8f3d60d938c0d5f209d2b48a2f12787a82a9a61b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 3 Mar 2026 07:42:34 +0000 Subject: [PATCH 2/2] feat: add health check endpoint for Render Co-authored-by: ghostleek <44336310+ghostleek@users.noreply.github.com> --- README.md | 3 ++- server.js | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5cdda33..d9f72c7 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,8 @@ To deploy to any Node.js-supported platform (Heroku, Railway, Render, etc.): 1. Push this repo to GitHub. 2. Set the build command to `npm install` and the start command to `node server.js`. -3. Optionally use a reverse proxy or HTTPS config for production. +3. Set the health check path to `/health`. +4. Optionally use a reverse proxy or HTTPS config for production. ## 💡 Potential Extensions diff --git a/server.js b/server.js index 7826f89..9a453f1 100644 --- a/server.js +++ b/server.js @@ -20,6 +20,10 @@ app.get('/console', (req, res) => { res.sendFile(path.join(__dirname, 'public', 'teacher.html')); }); +app.get('/health', (req, res) => { + res.status(200).send('OK'); +}); + // Store drawing history for each student and track teachers const rooms = new Map(); // sessionCode -> { students: Map, teacherSocketId: string }