File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed
Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ A package in Node can be used to add the following:
1717
1818An online egistry to search for node packages.
1919
20- ## 3. ` package.json ` file
20+ ## 3. Initialize ` npm ` in an application and create a ` package.json ` file
2121
2222The ` package.json ` file is created when the following command is ran in terminal:
2323
@@ -29,6 +29,27 @@ The `package.json` file contains the following:
2929* Dependencies - the list of packages used by your project
3030* Scripts - commands to automate development tasks e.g ` npm start ` will run the application server
3131
32+ Example of a ` package.json ` file
33+
34+ ``` json
35+ {
36+ "name" : " demo-web-server" ,
37+ "version" : " 1.0.0" ,
38+ "description" : " " ,
39+ "main" : " index.js" ,
40+ "scripts" : {
41+ "test" : " echo \" Error: no test specified\" && exit 1"
42+ },
43+ "keywords" : [],
44+ "author" : " Alex Paul" ,
45+ "license" : " ISC"
46+ }
47+ ```
48+
49+ To bypass initialization questions
50+
51+ ` npm init -y `
52+
3253## 4. Installing a package
3354
3455Download and add package and dependencies to be included in production.
You can’t perform that action at this time.
0 commit comments