From 3634b6ea4e9a487140a175633f5a68e5635dd29b Mon Sep 17 00:00:00 2001 From: IVANO Date: Thu, 11 May 2023 19:38:12 +0300 Subject: [PATCH] FETCH --- index.html | 13 ++++++++++++- index.js | 5 +---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 824584c..2e502a4 100644 --- a/index.html +++ b/index.html @@ -10,9 +10,20 @@

Значение ножки

-

Парам-пам-пам

+

Парам-пам-пам

+ diff --git a/index.js b/index.js index d92c5a0..82a0e71 100644 --- a/index.js +++ b/index.js @@ -44,11 +44,8 @@ const server = http.createServer((req, res) => { if (req.url == "/") { fs.readFile('index.html', 'utf-8', (err, data) => { - console.log(data); if (err) { - res.writeHead(404, { - 'Content-Type': 'application/json' - }); + res.writeHead(404); return; } res.writeHead(200, {