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 }