Saturday, July 2, 2016

Debugging nodejs w Chromium

electron
https://github.com/electron/electron
>>
The Electron framework lets you write cross-platform desktop applications
using JavaScript, HTML and CSS. It is based on Node.js and
Chromium and is used by the Atom
editor and many other apps.
<< 

https://mattdesl.svbtle.com/debugging-nodejs-in-chrome-devtools
 
# first install electron
$ sudo ln -s /usr/bin/nodejs /usr/local/bin/node
# DO NOT CONFUSE electron-prebuilt package (correct) with electron package (wrong) 
$ sudo npm install -g electron-prebuilt
 
# then devtool 
$ sudo npm install -g devtool
 
# run devtool from the cmd line, debugging server.js
$ devtool server.js --watch 

Friday, July 1, 2016

nodejs Modules

For reference, the official documentation is
@ https://nodejs.org/api/modules.html

Darren de Ridder (https://twitter.com/73rhodes)
has an excellent summary presentation on github.io
Node.JS Module Patterns Using Simple Examples
@ https://darrenderidder.github.io/talks/ModulePatterns/#/