Skip to content

Instantly share code, notes, and snippets.

@EliEladElrom
Last active December 16, 2015 08:39
Show Gist options
  • Save EliEladElrom/5407213 to your computer and use it in GitHub Desktop.
Save EliEladElrom/5407213 to your computer and use it in GitHub Desktop.
Node.js common useful commands

Node.js common useful commands

Download node.js: http://nodejs.org/download/

uinstall node:

http://stackoverflow.com/questions/5650169/uninstall-node-js-using-linux-command-line

which node

/usr/local/bin/node

Find versions:

node -v

npm -v

forever -h

Find node.js process via command line:

ps ax | grep node

kill -2 [pid]

Send port information to Nodejs:

sudo PORT=80 node server.js

Start server.js on port 80:

sudo forever start server.js

Show list;

forever list

Forever start service

forever start [name.js]

Forever stop service

forever stop [pid]

Path to node:

which node

Uninstall nodejs:

sudo apt-get remove nodejs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment