Making Node.js service always alive on Ubuntu Server

Forever Module is good, but you don’t need another software to control background processes on your server! One of the challenges in production is how to run Node.js services in background automatically restart them if they are crashing collect output/error logs for analyzing them later or watching them in a real time. All of them are similar to every long running application on server side, so the Linux community have that kind of tools natively integrated into almost every linux d ...

View More
  Dibaca 1421 kali

Tutorial Installing Express

Installing Assuming you’ve already installed Node.js, create a directory to hold your application, and make that your working directory. $ mkdir myapp $ cd myapp Use the npm init command to create a package.json file for your application. For more information on how package.json works, see Specifics of npm’s package.json handling. $ npm init This command prompts you for a number of things, such as the name and version of your application. For ...

View More
  Dibaca 1283 kali

Tutorial Install Latest Node.js and NPM on Ubuntu

Step 1 – Add Node.js PPA Node.js package is available in LTS release and the current release. It’s your choice to select which version you want to install on the system as per your requirements. Let’s add the PPA to your system to install Nodejs on Ubuntu. Use Current Release: At te last update of this tutorial, Node.js 10.0.0 is the current Node.js release available. sudo apt-get install curl python-software-properties curl -sL https://deb.nodesource.com/setup_10.x | sudo ...

View More
  Dibaca 1167 kali

Force Showing all errors and warnings in PHP

You can turn it on in the script: error_reporting(E_ALL); ini_set('display_errors', 1); ...

View More
  Dibaca 1142 kali