From 1eb64fdef31b79254a52dd86d5019fc93463840e Mon Sep 17 00:00:00 2001 From: gitea_admin Date: Mon, 16 Feb 2026 16:31:33 +0000 Subject: [PATCH] index js file --- src/index.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/index.js diff --git a/src/index.js b/src/index.js new file mode 100644 index 0000000..427be9a --- /dev/null +++ b/src/index.js @@ -0,0 +1,19 @@ +const express = require('express'); +const app = express(); +const PORT = process.env.PORT || 3000; + +app.get('/', (req, res) => { + res.json({ + message: 'Hello from NodeJS App!', + version: process.env.APP_VERSION || '1.0.0', + hostname: require('os').hostname() + }); +}); + +app.get('/health', (req, res) => { + res.json({ status: 'healthy' }); +}); + +app.listen(PORT, () => { + console.log(`Server running on port ${PORT}`); +}); \ No newline at end of file