This repository is a comprehensive and well-documented guide for Node.js, providing detailed explanations, and best practices for developers looking to enhance their Node.js skills.
- Node.js
- npm (Node Package Manager)
- nodemon (Install globally with
npm install -g nodemon
) - Basic knowledge of command line interface (CLI) operations.
To install Node.js, follow these steps:
- Go to the Node.js official website.
- Download the LTS (Long Term Support) version for your operating system.
- Follow the installation instructions for your specific operating system.
To verify the installation, open your terminal or command prompt and run the following command:
node -v
This should display the installed npm version.
- Create a new directory for your project and navigate into it:
mkdir my-project
cd my-project
- Initialize a new npm project. This will create a
package.json
file:
npm init -y
To run the scripts, use the following npm commands:
To run the file handling script, use:
npm run file
- File Handling:
npm run file
- Module Management:
npm run module
- HTTP Server:
npm run server
- Server Logging:
npm run server_log
- URL Handling:
npm run url
- Express Server:
npm run express
- Express Methods:
npm run methods
- Middleware:
npm run middleware
- Server-Side Rendering:
npm run render
- Uploading file:
npm run upload
"scripts": {
"file": "nodemon ./file_handling/file",
"module": "nodemon ./module/module",
"server": "nodemon ./http_server/index",
"server_log": "nodemon ./http_server/server_log",
"url": "nodemon ./url_handling/index",
"express": "nodemon ./express/index",
"methods": "nodemon ./express/methods",
"middleware": "nodemon ./Middleware/index",
"render": "nodemon ./server_side_rendering/server.js"
"upload": "nodemon ./upload_file/index.js"
}