Skip to content

Instantly share code, notes, and snippets.

@sanjay1688
Last active August 29, 2015 14:08
Show Gist options
  • Save sanjay1688/e69b775b899b76357ccc to your computer and use it in GitHub Desktop.
Save sanjay1688/e69b775b899b76357ccc to your computer and use it in GitHub Desktop.
Node Js Commands / Stuffs
Installtion of node and express
apt-get install libssl-dev
download node source code
wget http://nodejs.org/dist/v0.6.19/node-v0.6.19.tar.gz
tar -vxf node-v0.6.19.tar.gz
go inside source code dir after run configure and build source code and install
cd /node-v0.6.19
1) ./configure
2) make
3) sudo make install
4) sudo npm
Install NodeJs
sudo apt-get install python-software-properties
sudo apt-add-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
node -v
npm -v
******************************************************************************************************
Install Express
npm install -g express
npm install -g express-generator
express --version
express expressApp -c less // create express project with folder stuture
DEBUG = expressApp node app
npm start
Install Nodemon
Create file start.js in root
Add require('./bin/www')
Change paackage.json
{
start : "nodemon start.js"
}
now npm start
******************************************************************************************************
############## phusion passenger standalone ##############
steps for phusion passenger standalone
https://www.phusionpassenger.com/documentation/Users%20guide%20Standalone.html#install_add_apt_repo
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 561F9B9CAC40B2F7
Create a file /etc/apt/sources.list.d/passenger.list and insert
##### !!!! Only add ONE of these lines, not all of them !!!! #####
# Ubuntu 14.04
deb https://oss-binaries.phusionpassenger.com/apt/passenger trusty main
sudo chown root: /etc/apt/sources.list.d/passenger.list
sudo chmod 600 /etc/apt/sources.list.d/passenger.list
sudo apt-get update
sudo apt-get install passenger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment