api-dir
v1.0.1
Published
1. **Update `package.json`**
Downloads
2
Readme
Steps to Set Up and Run the Node.js Application
Update
package.json
- Open the
package.json
file. - Add or change the
"type"
field to"module"
.
{ "type": "module" }
- Open the
Copy
index.js
fromnodeModules
Directory- Go to the
nodeModules
directory. - Copy the
index.js
file.
- Go to the
Paste
index.js
in Root Directory- Paste the copied
index.js
file into the root directory of your project.
- Paste the copied
Run the Application
- Open your terminal.
- Navigate to the root directory of your project.
- Run the following command to generate the application folder:
node index.js
Directory Structure
src
├── app.js
├── controllers
│ └── user.controller.js
├── db
│ └── index.js
├── index.js
├── middlewares
│ ├── auth.middleware.js
│ └── multer.middleware.js
├── models
│ └── user.model.js
├── routes
│ └── user.route.js
└── utils
├── ApiError.js
├── ApiRespone.js
├── asyncHandler.js
└── cloudinary.js