Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions cloud66/node_6
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# {{Description: This snippet will automate the installation of Node.js v6.x}}

# Verify Node.js 6.x - exit if already installed
if (which nodejs > /dev/null && (nodejs -v | grep -q 'v6.')) then
exit
fi

# Remove old package version
if (dpkg -l nodejs > /dev/null) then
sudo apt-get remove -y nodejs
fi

# Remove old apt source
sudo rm -f /etc/apt/sources.list.d/nodesource.list

# Add new apt source
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -

# Install Node.js 6.x
sudo apt-get install -y nodejs
20 changes: 20 additions & 0 deletions cloud66/node_7
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# {{Description: This snippet will automate the installation of Node.js v7.x}}

# Verify Node.js 7.x - exit if already installed
if (which nodejs > /dev/null && (nodejs -v | grep -q 'v7.')) then
exit
fi

# Remove old package version
if (dpkg -l nodejs > /dev/null) then
sudo apt-get remove -y nodejs
fi

# Remove old apt source
sudo rm -f /etc/apt/sources.list.d/nodesource.list

# Add new apt source
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -

# Install Node.js 7.x
sudo apt-get install -y nodejs