itProger
Практика по Node JS
6 з 7
Кодинг
Ці завдання будуть доступні після покупки
підписки на проєкт
від 3 місяців.
Навігація
Задача №1
Задача №2
Задача №3
Задача №4
Задача №5
Задача №6
Задача №7
Дії
Перевірити
Переглянути рішення
const http = require('http'); const server = http.createServer((req, res) => { if (req.url === '/time' && req.method === 'GET') { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end(new Date().toISOString()); } else { res.writeHead(404); res.end('Not found'); } }); server.listen(3000);
const http = require('http'); const server = http.createServer((req, res) => { if (...) { // ... } else { res.writeHead(404); res.end('Not found'); } }); server.listen(3000);
Аналіз коду
Виконати аналіз
Додатково
Назад до практики
Довідник
Курс за темою