When fatal error happened, we’d like to kill the program. How to exit the program in Node.js? You can use: process.exit() Here, “process” is a global process object. exit method ends the process. process.exit([code]) Ends the process with the specified code. If omitted, exit uses the ‘success’ code 0. To exit with a ‘failure’ code: […]
How to install gitbook on my own Linux box? First, install node.js following https://www.systutorials.com/qa/1268/how-to-install-node-js-on-fedora or How to install node.js on Ubuntu/Linux Mint depending on your distro. Second, install gitbook by npm to /opt/: # cd /opt/ # npm install gitbook Then, the gitbook can be invoked by /opt/node_modules/gitbook/bin/gitbook.js Answered by Eric Z Ma. You may […]
How to install node.js on Ubuntu/Linux Mint? This is how I install node.js on Linux Mint: # aptitude install nodejs nodejs-legacy npm The nodejs-legacy makes sure the command node will invoke node.js. Answered by Eric Z Ma.
How to install node.js on Fedora? You may install it by: # yum install nodejs npm Answered by Eric Z Ma.