This commit is contained in:
kogleee
2023-11-08 13:17:48 +03:00
commit 3dbd9654c2
136 changed files with 14736 additions and 0 deletions

14
task15/app.js Normal file
View File

@@ -0,0 +1,14 @@
const http = require('http');
const fs = require('fs');
http.createServer(function (request, response) {
fs.readFile('index.html', 'utf8', function (error,data)
{
let message = 'Изучаем Node.js';
let header = 'Главная страница';
dataNew = data
.replace('{header}', header)
.replace('{message}', message);
response.end(dataNew);
});
}).listen(3000);