This is a beginner-friendly tutorial where you can simply browse the tutorials and view the code. It contains a straight forward examples.
- nodeJS os module
- nodeJS path module
- nodeJS fs module
- nodeJS path module
- nodeJS import and export modules
- it saving time to view direct topics without the need to read all over again.
- it provides examples straight to the point to use when a need calls for it.
- the examples are simple and easy to help recall how the syntax works.
- to import a nodejs module, we can simply declare a constant or variable and assign it the import.
For example:
const fs = require(fs
);
the recommended way:
const fs = require(node:fs
);
- to export, we can simply write the following syntax:
let addition = (a, b)=> a +b;
module.exports = addition
or
module.exports = {addition}