Node.js

From DreamFactory
Jump to: navigation, search
(Created page with "# Get required software from Apt #*<source lang=bash>$ sudo apt-get install build-essential openssl libssl-dev pkg-config</source> # Get the latest stable Node source (version...")
 
Line 1: Line 1:
# Get required software from Apt
+
# Get deb installer
#*<source lang=bash>$ sudo apt-get install build-essential openssl libssl-dev pkg-config</source>
+
#*<source lang=bash>$ curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -</source>
# Get the latest stable Node source (version 7.1.0 as of 11/2016)
+
# Install with Apt
#*<source lang=bash>$ wget https://nodejs.org/dist/latest/node-v7.1.0.tar.gz</source>
+
#*<source lang=bash>$ sudo apt-get install -y nodejs</source>
 
# Extract the package
 
# Extract the package
 
#*<source lang=bash>$ tar -zxf node-v7.1.0.tar.gz</source>
 
#*<source lang=bash>$ tar -zxf node-v7.1.0.tar.gz</source>
# Compile and build the source
 
#* <source lang=bash>$ cd node-v7.1.0</source>
 
#* <source lang=bash>$ ./configure</source>
 
#* <source lang=bash>$ make</source>
 
#* <source lang=bash>$ sudo make install</source>
 
*After successfully installing Node.js you will be able to use Node.js for scripting and NPM to install additional modules.
 
* Edit the '''.env''' file uncommenting the '''DF_NODEJS_PATH''' by removing the two hash signs (##) preceding the path.
 
'''Note:''' By default the path is  '''/usr/local/bin'''. If you installed elsewhere in another directory now is the time to specify the relevant path.
 
*Save your changes and restart Apache.
 

Revision as of 19:47, 11 November 2016

  1. Get deb installer
    • $ curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
  2. Install with Apt
    • $ sudo apt-get install -y nodejs
  3. Extract the package
    • $ tar -zxf node-v7.1.0.tar.gz