Skip to content

Commit

Permalink
Add NodeJS set up
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiomt committed Jul 16, 2019
1 parent 9fd78b5 commit 1a66f2a
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
24 changes: 24 additions & 0 deletions vagrant-setup/nodejs10x.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

# Install NodeJS

SETUP="/vagrant/vagrant-setup"
PPWD=$PWD

if [ -d "/usr/share/nodejs" ]
then

echo "NodeJS is already installed, nothing done!"

else

source $SETUP/include.sh

curl -sL https://rpm.nodesource.com/setup_10.x | sudo bash -

yum install -y nodejs
./node --version

cd $PPWD

fi
35 changes: 35 additions & 0 deletions vagrant-setup/nodejs812.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash

# Install NodeJS 8.12.2

SETUP="/vagrant/vagrant-setup"
PPWD=$PWD

if [ -d "/usr/share/nodejs" ]
then

echo "NodeJS is already installed, nothing done!"

else

source $SETUP/include.sh

cd /usr/share
wget_and_untar http://nodejs.org/dist/v8.12.0/ node-v8.12.0-linux-x64.tar.gz
mv node-v8.12.0-linux-x64 nodejs
cd /usr/bin
ln -s /usr/share/nodejs/bin/node node
ln -s /usr/share/nodejs/bin/npm npm
cd /usr/share/nodejs/bin
./node --version
./npm config set strict-ssl false
./npm -g install bower concurrently express express-generator supervisor typescript tslint
cd /usr/bin
ln -s /usr/share/nodejs/bin/bower bower
ln -s /usr/share/nodejs/bin/express express
ln -s /usr/share/nodejs/bin/tsc tsc
ln -s /usr/share/nodejs/bin/concurrently concurrently

cd $PPWD

fi

0 comments on commit 1a66f2a

Please sign in to comment.