Server Command

Start and restart

  • pm2 list to check the status of servers and the server id.

  • pm2 restart server_id to restart server

Database command

export PATH=<mongodb-install-directory>/bin:$PATH
  • error :

Failed global initialization: BadValue Invalid or no user locale set. Please ensure LANG and/or LC_* environment variables are set correctly

solution:

(sudo locale-gen)
export LC_ALL=C
mongo
  • start mongod :

sudo service mongod start