Create package.json file for NodeJS projects
The NodeJS project is use a configuration file name is package.json and this file includes configuration and description about the project with dependent files. The NodeJS package.json file structure sample is below type:-
{
"name": "myapp",
"version": "1.0.0",
"description": "This is myapp",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
},
"author": "priyadigitech",
"license": "MIT",
"dependencies": {
"jquery": "1.3.0",
}
}
You can create another way in new projects or existing projects by using npm init command in cmd after setting the project directory path.
0 Comments