File tree Expand file tree Collapse file tree 3 files changed +36
-0
lines changed Expand file tree Collapse file tree 3 files changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ /***
2+ * The goal of this file is to know about the process functions;
3+ *
4+ *
5+ * How to run this example:
6+ * 1. node process-1.js
7+ * 2. See the message get displayed on prompt.
8+ */
9+
10+ console . log ( 'Starting directory: ' + process . cwd ( ) ) ;
11+
12+ try {
13+ process . chdir ( '../' ) ;
14+ console . log ( 'New directory: ' + process . cwd ( ) ) ;
15+ } catch ( error ) {
16+ console . log ( 'Chdir: ' + error ) ;
17+ }
Original file line number Diff line number Diff line change 1+ /***
2+ * The goal of this file is to know about the process functions;
3+ *
4+ *
5+ * How to run this example:
6+ * 1. node process-2.js
7+ * 2. See the message get displayed on prompt.
8+ */
9+
10+ console . log ( "Process ID: %s" , process . pid ) ;
11+
12+ console . log ( "Process Title: %s" , process . title ) ;
13+
14+ console . log ( "Process Arch: %s" , process . arch ) ;
15+
16+ console . log ( "Process Platform: %s" , process . platform ) ;
17+
18+ var util = require ( 'util' ) ;
19+ console . log ( util . inspect ( process . memoryUsage ( ) ) ) ;
You can’t perform that action at this time.
0 commit comments