package update

This commit is contained in:
2026-02-23 11:41:26 +05:30
parent fa41640c09
commit 7b88426f96
2 changed files with 63 additions and 31 deletions

18
healthcheck.js Normal file
View File

@ -0,0 +1,18 @@
// healthcheck.js
const http = require('http');
const options = {
host: 'localhost',
port: process.env.PORT || 3000,
path: '/',
timeout: 5000,
};
const req = http.request(options, (res) => {
process.exit(res.statusCode === 200 ? 0 : 1);
});
req.on('error', () => process.exit(1));
req.on('timeout', () => process.exit(1));
req.end();