Node.js-da dastlabki serverni yaratish uchun quyidagi qadamlarni bajarishingiz mumkin: matn muharririni oching va yangi fayl yarating. Uni server.js yoki boshqa xohlagan nom bilan nomlang. Server.js fayliga quyidagi kodni qo'shing: javascript const http = require 'http'); const hostname = 'localhost'; const port = 3000; const server = http.createServer'req, res) => { res.statusCode = 200; res.setHeader 'Content-Type', 'text/plain'); res.end 'Hello, World!\n'); }); server.listen 'port,name, () => { console.log.`{ Server running at http://{hostname}: {$port/`}); Ushbu kod Node.js-da o'rnatilgan modul yordamida asosiy HTTP serverni
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence