feat: minimal tf-docs nodejs skeleton (empty page, v0.0.0)

This commit is contained in:
“Naeel”
2026-09-02 08:38:10 +03:00
parent 7c2e33b969
commit e6719164f5
2 changed files with 41 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
{
"name": "tf-docs",
"version": "0.0.0",
"description": "Terraform docs service (S3 static /docs) — initial skeleton",
"main": "server.js",
"scripts": {
"start": "node server.js",
"check": "node -c server.js"
},
"engines": {
"node": ">=18"
}
}
+28
View File
@@ -0,0 +1,28 @@
'use strict';
const http = require('http');
const PORT = process.env.PORT || 3000;
const VERSION = process.env.APP_VERSION || '0.0.0';
const SERVICE = 'tf-docs';
const server = http.createServer((req, res) => {
res.statusCode = 200;
res.setHeader('Content-Type', 'text/html; charset=utf-8');
res.end(`<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="utf-8">
<title>${SERVICE}</title>
</head>
<body>
<h1>${SERVICE}</h1>
<p>version: ${VERSION}</p>
</body>
</html>
`);
});
server.listen(PORT, () => {
console.log(`[${SERVICE}] listening on :${PORT} (version ${VERSION})`);
});