Added content to the Running Scripts in Node.js - npm (#2294)
* Edited the typeof operator file * Update 104-running-scripts.md * Added the content to the stack-trace.md * Added content for the 104-asyn-errors.md file * Update content/roadmaps/107-nodejs/content/103-nodejs-error-handling/100-stack-trace.md Co-authored-by: Kamran Ahmed <kamranahmed.se@gmail.com>pull/2285/head^2
parent
f9079b12e6
commit
2230ac817b
4 changed files with 17 additions and 6 deletions
@ -1,6 +1,6 @@ |
|||||||
# Typeof Operator |
# TypeOf Operator |
||||||
|
|
||||||
You can use the typeof operator to find the data type of a JavaScript variable. |
You can use the typeOf operator to find the data type of a JavaScript variable. |
||||||
|
|
||||||
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof'>Typeof Reference</BadgeLink> |
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof'>Typeof Reference</BadgeLink> |
||||||
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.w3schools.com/js/tryit.asp?filename=tryjs_typeof_all'>Typeof Live Examples</BadgeLink> |
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.w3schools.com/js/tryit.asp?filename=tryjs_typeof_all'>Typeof Live Examples</BadgeLink> |
@ -1,8 +1,8 @@ |
|||||||
# Running Scripts |
# Running Scripts |
||||||
|
|
||||||
Scripts are defined in the `package.json` file under the **scripts** tag. |
In Node.js, npm scripts are used for the purpose of initiating a server, starting the build of a project, and also for running the tests. We can define this scripts in the package.json file of the folder. Also, we can split the huge scripts into many smaller parts if it is needed. |
||||||
To run a script called "myScript" -- run `npm run myScript` and it'll execute the commands defined in the `package.json` file |
|
||||||
|
|
||||||
<ResourceGroupTitle>Free Content</ResourceGroupTitle> |
<ResourceGroupTitle>Free Content</ResourceGroupTitle> |
||||||
|
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://riptutorial.com/node-js/example/4592/running-scripts'>Example of Running Scripts</BadgeLink> |
||||||
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.geeksforgeeks.org/introduction-to-npm-scripts/'>Introduction to NPM Scripts</BadgeLink> |
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.geeksforgeeks.org/introduction-to-npm-scripts/'>Introduction to NPM Scripts</BadgeLink> |
||||||
<BadgeLink colorScheme='blue' badgeText='Official Website' href='https://docs.npmjs.com/downloading-and-installing-packages-locally'>Running Scripts</BadgeLink> |
<BadgeLink colorScheme='blue' badgeText='Official Website' href='https://docs.npmjs.com/downloading-and-installing-packages-locally'>Running Scripts</BadgeLink> |
||||||
|
@ -1 +1,7 @@ |
|||||||
# Stack trace |
# Stack trace |
||||||
|
|
||||||
|
If any error occurs during the execution of the program, Stack trace will be displayed automatically by the JVM for its indication. All the active stack frames at a particular instance during the execution of the program can be traced by the stack trace. This is very helpful for the debuggers because during the code debugging, we can easily identify at which point the error had occurred. |
||||||
|
|
||||||
|
<ResourceGroupTitle>Free Content</ResourceGroupTitle> |
||||||
|
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.geeksforgeeks.org/what-is-stacktrace-and-how-to-print-in-node-js/'>What is Stack trace?</BadgeLink> |
||||||
|
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.cloudhadoop.com/nodejs-print-stack-trace-error/'>Multiple ways to log the stack trace in node.js</BadgeLink> |
@ -1 +1,6 @@ |
|||||||
# Async errors |
# Async errors |
||||||
|
|
||||||
|
Errors must always be handled. If you are using synchronous programming you could use a try catch. But this does not work if you work asynchronous!Async errors will only be handled inside the callback function! |
||||||
|
|
||||||
|
<ResourceGroupTitle>Free Content</ResourceGroupTitle> |
||||||
|
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.mariokandut.com/handling-errors-in-asynchronous-functions-node-js/'>Asyn Errors</BadgeLink> |
Loading…
Reference in new issue