coding with ☕️
2 subscribers
262 photos
14 videos
11 files
165 links
Anwendungsentwicklung
Download Telegram
os.platform() — operatsion tizim (Windows, Linux, macOS)

os.cpus() — processorlar ro‘yxati

os.freemem() / os.totalmem() — RAM holati

os.uptime() — kompyuter necha vaqtdan beri ish holatida
const os = require('os');

console.log("Tizim platformasi:", os.platform()); // misol: 'win32' yoki 'linux'
console.log("Tizim arxitekturasi:", os.arch()); // misol: 'x64'
console.log("CPU soni:", os.cpus().length); // CPU'lar soni
console.log("Bo‘sh RAM (MB):", os.freemem() / 1024 / 1024); // RAM bo‘sh joy (MB)
console.log("Umumiy RAM (MB):", os.totalmem() / 1024 / 1024); // RAM umumiy joy (MB)
console.log("Uzatish vaqti (uptime - soniya):", os.uptime());
OS Tizim (kompyuter) Kompyuter holati haqida ma’lumot beradi

FS Fayllar, Fayllarni yaratish, o‘qish, o‘chirish
Nimalarni qo‘shadi Node.js:
Fayllar bilan ishlash (FS moduli)

Tarmoq (HTTP server, TCP)

Ma’lumotlar bazasi bilan ulanish (MySQL, MongoDB)

Modul tizimi (CommonJS, ESModules)

Operatsion tizim bilan aloqa (OS moduli)

Paketlar (npm install express va boshqalar)
    response.write('Hello World')
response.end()
const fs = require('fs');

fs.readFile('./file/lorem.txt', 'utf8', (err, data) => {
if ( err) throw err;
console.log(data);

})
const fs = require('fs');

fs.readFile('./file/lorem.txt', (err, data) => {
if ( err) throw err;
console.log(data.toString());

})
coding with ☕️
https://youtu.be/f2EqECiTBL8?si=3cTRK7yFrqDmFmt6
I promise I will end this video in several days 7:00:01 now I ve finished only 24 minutes
coding with ☕️ pinned «I promise I will end this video in several days 7:00:01 now I ve finished only 24 minutes»
Nest.jst ,Express.js, Node.js, MongoDB ,PosterSQL, ,MySQL, Koa.js, Fastify
const fs = require("fs");
const path = require("path");

fs.readFile(
path.join(__dirname, "files", "starter.txt"),
"utf8",
(err, data) => {
if (err) throw err;
console.log(data);
}
);

console.log("Hello...");

fs.writeFile(
path.join(__dirname, "files", "reply.txt"),
"Nice to meet you.",
(err) => {
if (err) throw err;
console.log("Write complete");

fs.appendFile(
path.join(__dirname, "files", "reply.txt"),
"\n\nYes it is. ",
(err) => {
if (err) throw err;
console.log("Append complete");

fs.rename(
path.join(__dirname, "files", "reply.txt"), path.join(__dirname, 'files', 'newReply.txt'),
(err) => {
if (err) throw err;
console.log("Rename complete");
}
);
}
);
}
);
Chapter 4
Event Emitter
JavaScript kodni native code (mashina kodi)ga oʻgirib beradi.