Test JS script file

Selected file: 11module_nesting.js
Compare console.log() outputs in browser and NodeJS.
Notice: Open browser's console in FireBUG!

  1. 05define_functions.js
  2. 10module_basic1.js
  3. 10module_basic2.js
  4. 10module_basic3.js
  5. 11module_nesting.js
  6. file.js
  7. fs-async.js
  8. fs-async2.js
  9. fs-async3.js
  10. fs-sync.js
  11. fs-sync2.js
  12. http.js
  13. index.html
  14. index.js
  15. my_modules
  16. net.js
  17. npm-debug.log
  18. package.json
  19. promises
  20. socket.js
  21. sys.js
  22. testfiles

..:: Source code - 11module_nesting.js ::..

/**
 * The usage of the custom modules
 */
var m1 = require('./my_modules/module4.js');

var eng = m1.sayHelloInEnglish();
var cro = m1.sayHelloInCroatian();
var spa = m1.mod4_1();

console.log("\n");

console.log(eng);
console.log(cro);
console.log(spa);

console.log("\n");
 

..:: NodeJS Console - 11module_nesting.js ::..

$ node 11module_nesting.js

HELLO from primary module
ZDRAVO from primary module
HOLA from secondary module


$ps -aux | grep node (list all node processes)
sasa         831  0.5  0.4 1304176 80504 ?       Ssl  Jun15 121:32 node /home/sasa/.pm2/modules/pm2-logrotate/node_modules/pm2-logr
sasa         843  0.5  0.6 11699640 104396 ?     Ssl  Jun15 117:00 node /home/sasa/dex8/dex8-api/starter.js
sasa         858  0.4  0.4 1303596 72420 ?       Ssl  Jun15  91:47 node /home/sasa/regoch/regoch-www/server
sasa         867  0.3  0.4 1298972 66072 ?       Ssl  Jun15  86:38 node /home/sasa/dex8/dex8-panel/server/index.js
sasa         886  0.8  0.7 11831652 117012 ?     Ssl  Jun15 183:01 node /home/sasa/dex8/dex8-www/server/index.js
sasa         888  0.5  0.4 11794160 80076 ?      Ssl  Jun15 126:52 node /home/sasa/mikosoft_hr/www-mikosoft-hr/server/index.js
sasa         904  0.7  0.5 1329652 82228 ?       Ssl  Jun15 168:27 node /home/sasa/mikosoft-info/api-mikosoft-info/starter.js
sasa         910  0.3  0.4 1300780 70048 ?       Ssl  Jun15  87:24 node /home/sasa/mikosoft-info/www-mikosoft-info/server/index.js
sasa         969  0.3  0.3 1297484 64396 ?       Ssl  Jun15  86:24 node /home/sasa/dex8/dex8-kiosk/server/index.js
sasa         970  0.6  0.5 11811796 95140 ?      Ssl  Jun15 155:20 node /home/sasa/mikosoft-info/dodo-mikosoft-info/server/index.js
sasa        1010  0.6  0.6 1147316 103252 ?      Ssl  Jun15 145:51 node /home/sasa/voovuu/voovuu-api/starter.js
sasa        1016  0.8  1.1 11873484 185912 ?     Ssl  Jun15 193:04 node /home/sasa/voovuu/voovuu-pub/server/index.js
sasa        1086  0.4  0.4 11794400 77508 ?      Ssl  Jun15  93:35 node /home/sasa/@mikosoft/dodo-examples/server/index.js
sasa        1089  0.3  0.3 1099356 65104 ?       Ssl  Jun15  88:32 node /home/sasa/dex8/dex8-worker/starter.js
sasa        1159  0.3  0.4 22276156 76208 ?      Ssl  Jun15  89:59 node /home/sasa/dex8/dex8-worker/starter.js
sasa        1160  0.3  0.3 1099612 63592 ?       Ssl  Jun15  88:38 node /home/sasa/dex8/dex8-worker/starter.js
sasa        1241  0.3  0.3 1101464 63684 ?       Ssl  Jun15  88:55 node /home/sasa/dex8/dex8-worker/starter.js
sasa        1242  0.4  0.5 22284380 84956 ?      Ssl  Jun15  94:11 node /home/sasa/dex8/dex8-worker/starter.js
sasa        1323  0.3  0.3 1099356 63756 ?       Ssl  Jun15  88:46 node /home/sasa/dex8/dex8-worker/starter.js
sasa        1324  0.3  0.3 1099872 64824 ?       Rsl  Jun15  88:33 node /home/sasa/dex8/dex8-worker/starter.js
sasa        1398  0.3  0.3 1099616 63744 ?       Ssl  Jun15  88:44 node /home/sasa/dex8/dex8-worker/starter.js
sasa        1400  0.3  0.3 1099612 64204 ?       Ssl  Jun15  88:59 node /home/sasa/dex8/dex8-worker/starter.js
sasa        1465  0.3  0.3 1099872 64228 ?       Ssl  Jun15  88:45 node /home/sasa/dex8/dex8-worker/starter.js
sasa      178968  0.8  0.6 11810912 99504 ?      Ssl  Jun17 161:35 node /home/sasa/mikosoft-info/crypto-mikosoft-info/server/index.
sasa      337381  1.2  0.5 1317564 92052 ?       Ssl  Jun19 203:02 node /home/sasa/crypto/dex-arbitrage-bot/scripts/observer/index2
www-data 1163946  0.0  0.0   2608   540 ?        S    00:09   0:00 sh -c ps -aux | grep node
www-data 1163948  0.0  0.0   3304   656 ?        S    00:09   0:00 grep node