SOLVED: /usr/bin/env: node: No such file or directory

While working with NodeJS on an AWS Ubuntu 14 box, I got the following error:

On some Linux distributions, AWS in my case, there is a namespace issue which causes errors at times. The error is a result of some distributions installing NodeJS with the name nodejs as opposed to node. The fix is easy Simply create a… Read more SOLVED: /usr/bin/env: node: No such file or directory

Error: listen EADDRINUSE with NodeJS Server

EADDRINUSE indicates the port number that listen() is attempting to bind the server to is already in use. Sometimes, even though you have hit Control C a few times. Somehow nodejs is still running. My guess is that there are lingering processes from a faulty termination for whatever reason. How to fix Error: listen EADDRINUSE… Read more Error: listen EADDRINUSE with NodeJS Server

How to setup Node.js application server with port 80 

Port 80 Redirect port 80 to port 3000 with this command:

Then launch the Node.js application on port 3000. Now requests to port 80 will map to the nodejs application on port 3000. Edit the /etc/rc.local file and adding iptables port redirection line (without ‘sudo’). This step with cause the port redirect when the… Read more How to setup Node.js application server with port 80 

Use ps to view Processes, sort them, and kill them

This is a quick note on how to work with linux/Unix/Mac processes. If you want to go straight for the ‘kill’ Start by getting the process ID with pgrep process name. Then use kill to kill the process. But, be nice about it, ok? $>pgrep mongod $>kill <PID> Use ps to List Processes $> ps… Read more Use ps to view Processes, sort them, and kill them