-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.20.nvm.sh
34 lines (26 loc) · 1.09 KB
/
setup.20.nvm.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
echo "---install nvm---" #https://github.com/creationix/nvm/blob/master/README.markdown
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.3/install.sh | bash
source ~/.nvm/nvm.sh
nvm ls
echo "---deal with evironmental variables---"
#printf export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" >> ~/.bashrc
#source ~/.bashrc
echo 'echo "running ~/.profile"' >> ~/.profile
echo 'source ~/.nvm/nvm.sh' >> ~/.profile
echo 'echo "running ~/.bashrc"' >> ~/.bashrc
echo 'source ~/.nvm/nvm.sh' >> ~/.bashrc
echo "---install node---"
nvm install node
sudo nvm install node
echo "---get forever---"
npm install forever -g
echo "---node and npm versions---"
node -v
npm -v
echo "---symlink for nodejs to be also called node---"
sudo ln -s /usr/bin/nodejs /usr/bin/node
# let's get "node_modules" out of the synced folder
mkdir -p -v /home/vagrant/app/client/node_modules
mkdir -p -v /home/vagrant/app/server/node_modules
sudo ln -s /vagrant/app/server/node_modules/ /home/vagrant/app/server/node_modules
sudo ln -s /vagrant/app/client/node_modules/ /home/vagrant/app/client/node_modules