Node.js

From DreamFactory
Jump to: navigation, search
Line 1: Line 1:
 
# Get deb installer
 
# Get deb installer
#*<source lang=bash>$ curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -</source>
+
#* <source lang=bash>$ curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -</source>
 
# Install with Apt
 
# Install with Apt
#*<source lang=bash>$ sudo apt-get install -y nodejs</source>
+
#* <source lang=bash>$ sudo apt-get install -y nodejs</source>
# Extract the package
+
# Configure DreamFactory to use Node
#*<source lang=bash>$ tar -zxf node-v7.1.0.tar.gz</source>
+
#* <source lang="bash">$ cd /opt/dreamfactory</source>
 +
#* <source lang="bash">$ nano .env</source>
 +
#** Locate the line that reads <code>##DF_NODEJS_PATH=/usr/local/bin/node</code>
 +
#** Change it to read <code>DF_NODEJS_PATH=/usr/bin/node</code>
 +
#** Save and exit the file
 +
#* <source lang="bash">$ php artisan cache:clear</source>
 +
# Restart the PHP-FPM and Nginx or Restart Apache (whichever solution you're using.)
 +
#* Nginx
 +
#** <source lang="bash">$ sudo service php7.0-fpm restart && sudo service nginx restart</source>
 +
#* Apache
 +
#** <source lang="bash">$ sudo  service apache2 restart</source>

Revision as of 19:51, 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. Configure DreamFactory to use Node
    • $ cd /opt/dreamfactory
    • $ nano .env
      • Locate the line that reads ##DF_NODEJS_PATH=/usr/local/bin/node
      • Change it to read DF_NODEJS_PATH=/usr/bin/node
      • Save and exit the file
    • $ php artisan cache:clear
  4. Restart the PHP-FPM and Nginx or Restart Apache (whichever solution you're using.)
    • Nginx
      • $ sudo service php7.0-fpm restart && sudo service nginx restart
    • Apache
      • $ sudo  service apache2 restart