選考直結型ガクセイハッカソン 2025.03の開催レポート
2025-04-14 公開
2022-08-07 公開
Node.jsのモジュールを理解する。
const http = require("http");
const fs = require("fs");
fs.readFile("data1.txt", "utf-8", (err, data) => {
if (err) throw err;
console.log(data);
});
const sayHelloWorld = () => {
console.log("hello world!");
};
exports.sayHelloWorld1 = sayHelloWorld1;
const { sayHelloWorld1 } = require("./hello_world");
sayHelloWorld();
今回はNode.jsのモジュールについて学習しました。次回はNode.jsのパッケージ管理について学んでいきます。