# Node.js Core Modules Practice
Welcome to the **Node.js Core Modules** repository! This project serves as a practical hands-on demonstration of Node.js built-in modules. It is intended for beginners, students, and developers who want to understand how to work with the most commonly used core modules in Node.js without external dependencies.
## 🧠 Project Objective
This project aims to provide a clear and concise understanding of:
- What Node.js core modules are
- How to use them in real applications
- Practical examples using each module in a simple and straightforward manner
---
nodejs_core/ │ ├── cryptoModule.js # Usage of the 'crypto' module ├── eventModule.js # Working with the 'events' module ├── fsModule.js # File system operations using 'fs' ├── osModule.js # Interacting with the OS using 'os' ├── pathModule.js # File path operations using 'path' ├── processModule.js # Accessing and managing process-related info ├── urlModule.js # Parsing and formatting URLs │ ├── server.js # Simple HTTP server using Node's 'http' module ├── postController.js # Controller to handle POST request logic │ └── package.json # (Optional) Add if you include npm scripts or dependencies
---
## 🚀 Getting Started
### 1. Clone the Repository
```npm
git clone https://github.com/officialTechBro/nodejs_core.git
cd nodejs_core
Each module can be executed independently using Node.js:
node fsModule.js
To run the HTTP server:
node server.js
| Module | Description |
|---|---|
fs |
File system interactions (read/write files) |
os |
System-level information (CPU, memory, uptime) |
path |
File and directory path handling |
crypto |
Hashing and encryption operations |
events |
Event-driven architecture with custom emitters |
url |
URL parsing and formatting |
process |
Access and control of the current process |
http |
Building a simple web server |
The server.js script spins up a basic HTTP server and routes incoming requests to different handlers based on the URL and HTTP method. The postController.js handles logic for POST requests specifically.
- Node.js v14+ recommended
- No external dependencies are required
- Add Express.js examples alongside core HTTP module
- Add a frontend interface to interact with the server
- Unit tests for each module demonstration
- Add comments and documentation in code
Contributions are welcome! Feel free to fork this repository and submit a pull request with improvements, fixes, or new features.
This project is licensed under the MIT License.