Node.js / npm commands

by Yury

JavaScript

//Listing globally installed NPM packages and version
npm list -g --depth=0

//sabma config
sudo nano /etc/samba/smb.conf

//samba restart
sudo service smbd restart

//ubuntu: open samba ports
sudo ufw allow Samba

//ubuntu open port (http://help.ubuntu.ru/wiki/%D1%80%D1%83%D0%BA%D0%BE%D0%B2%D0%BE%D0%B4%D1%81%D1%82%D0%B2%D0%BE_%D0%BF%D0%BE_ubuntu_server/%D0%B1%D0%B5%D0%B7%D0%BE%D0%BF%D0%B0%D1%81%D0%BD%D0%BE%D1%81%D1%82%D1%8C/firewall)
sudo ufw allow 8080

/** FIX FOR: events.js:72   throw er; // Unhandled 'error' event **/
// stackoverflow.com/questions/16827987/expressjs-throw-er-unhandled-error-event
// kill another node *app*.js instance for same port running:
/* If you want to find and kill process, follow these steps: */
ps aux | grep node
Find the process ID (second from the left):
kill -9 PRCOCESS_ID
	
/* 2	See if you have the */ killall /* command, much less typing */
/* 3 */	ps aux | grep node | awk '{print $2}' | xargs kill -9

//***********//

//files/folders listing (-1 = per-line, -Al = with system hiddens)
ls -1 -Al

//To upgradenpm, run: 
[sudo] npm install npm@latest -g






_____________________________________________________________________________________

bitnami@linux:~/nodejs$ sudo nano /etc/samba/smb.conf
  GNU nano 2.2.6                     File: /etc/samba/smb.conf

   map archive = no
      create mask = 0777
      directory mask = 0777

[home-bitnami]
        browseable = yes
        comment = home bitnami folder
        usershare max shares = 100
        path = /home/bitnami
        read only = No
        writable = yes
        valid users = bitnami
#       force user = root
   guest ok = no
   map archive = no
      create mask = 0777
      directory mask = 0777

[usr-local]
        browseable = yes
        comment = usr => local folder
        usershare max shares = 100
        path = /usr/local
        read only = No
        writable = yes
        valid users = bitnami
#       force user = root
   guest ok = no
   map archive =...