This repository contains various small Node.js modules and JavaScript code snippets created during my learning process.
These files cover different functionalities such as file operations, global objects, and basic HTTP modules in Node.js.
This repository includes several JavaScript files, each covering different concepts in Node.js:
- fileOperations.js: Demonstrates file system operations like reading, writing, and updating files.
- httpmodule.js: Implements basic HTTP server functionality using Node.js.
- globalObjects.js: A simple example of Node.js's global objects such as
__dirname
and__filename
. - useModules.js: Example of importing and using custom modules in Node.js.
- sayhello.js: A basic example to print a greeting message using a simple function.
- osInfo.js: Fetches and logs operating system information using Node.js's
os
module.
- Demonstrates the use of Node.js modules.
- Covers file system operations (reading/writing files).
- Implements basic HTTP functionality for creating web servers.
- Uses global objects like
__dirname
,__filename
. - Example of using third-party modules and custom modules.
Folder / File | Purpose |
---|---|
app.js |
Main entry point of the application. |
fileOperations.js |
Demonstrates file handling. |
globalObjects.js |
Shows usage of global objects. |
httpmodule.js |
HTTP server example. |
names.js |
Simple module to export names. |
osInfo.js |
Logs OS info using Node.js's os module. |
pathinfo.js |
Path manipulation example. |
sayhello.js |
Basic hello function. |
useModules.js |
Shows how to use custom modules. |
package.json |
Contains metadata and dependencies. |
package-lock.json |
Ensures consistent installs. |
-
Clone the repository
👉 GitHub Repository Linkgit clone https://github.com/Noursalem2005/Node.js-Learning-Repository cd temp_node