Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the ad-inserter domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/vhosts/blog.webeats.it/httpdocs/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the cookie-law-info domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/vhosts/blog.webeats.it/httpdocs/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/vhosts/blog.webeats.it/httpdocs/wp-includes/functions.php on line 6114
Installare NodeJS su Ubuntu LTS 16.04 e 14.04

Un breve tutorial su come aggiungere un repository PPA per installare NodeJS su Ubuntu LTS. Guida valida per Ubuntu LTS 16.04, 14.04 e 12.04

Prima di tutto è necessario aggiungere il repository PPA al nostro apt

sudo apt-get install python-software-properties
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -

Ora possiamo installare tranquillamente NodeJS (attualmente in versione stable 6.1.0, o 4.4.4 per la LTS) eseguendo il comando

sudo apt-get install nodejs

NodeJS risulterà installato ora sul nostro server Ubuntu. Per verificare la corretta installazione e la versione presente sul server di NodeJS ed npm, possiamo digitare

NodeJS su Ubuntu LTS

node -v
v6.1.0

npm -v 
3.8.6

Ora creiamo un piccolo webserver per fare qualche test. Creiamo un file chiamato myserver.js con il comando

pico myserver.js

ora incolliamo al suo interno

var http = require('http');
http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Hello Worldn');
}).listen(3001, "127.0.0.1");
console.log('Server running at http://127.0.0.1:3001/');

Avviamolo e avremo un output simile al seguente

node --debug http_server.js

debugger listening on port 5858
Server running at http://127.0.0.1:3001/

Maggiori informazioni possiamo trovarle sul sito ufficiale.