Posted in Linux

Debian | Download package with all dependencies

$ sudo apt-get download [PACKAGE] && apt-cache depends -i [PACKAGE] | awk ‘/Depends:/ {print $2}’ | xargs¬† apt-get download

Advertisements
Posted in Nodejs

Nodejs | Operate web server whenever power on

Add below lines to ‘/etc/rc.local’

sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3000

node /home/ubuntu/landing_page/landing_page.js

 

External mobule is also available like ‘forever’ for setting¬†the server to execute nodejs script whenever the machine is on.