-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnotes file.txt
38 lines (23 loc) · 1.35 KB
/
notes file.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
* npm init : This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.
See `npm help init` for definitive documentation on these fields
and exactly what they do.
Use `npm install <pkg>` afterwards to install a package and
save it as a dependency in the package.json file.
* When a package is installed, package-lock.json is created.
* Validator package performs checks on various inputs like email, url etc.
* Chalk package colors the text
* npm install [email protected] - to install chalk package
* nodemon package runs the code everytime whenever a change is made. Run command 'nodemon app.js'
* node app.js add --title="hello" --body="This is a note" : This command is used for adding a note with title and body
* JSON.parse() : This function converts the dataset into an object so that individual values can be accessed.
* const square = function (x) {
return x * x
} //this is a normal definition of function
const square = (x) => {
return x * x
} //this is an alternative definition of function
console.log(square(3))
* 'node inspect app.js add --title="hello" --body="This is my first note"' : type this command in vs console to start the debugger
* 'chrome://inspect' : type in chrome to open chrome debugger
* For the packages like chalk to run, import the modules file