Skip to content

Commit

Permalink
Solve the symlink issue by installing dependencies in the home folder.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nemikolh committed Feb 26, 2017
1 parent b40c0bb commit 3cb208b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,17 @@ if ! type "npm" > /dev/null; then
node_ver=`eval node --version`
cp -v ./mongo-express-config.js ~/.nvm/versions/node/$node_ver/lib/node_modules/mongo-express/config.js
echo "alias mongo-express='node ~/.nvm/versions/node/'$node_ver'/lib/node_modules/mongo-express/app.js'" >> ~/.bashrc

echo "alias npm='npm --prefix ~'" >>~/.bashrc
else
echo "npm already installed"
fi

ln -S /vagrant/package.json ~/package.json

# Does the user has already downloaded the dependencies?
export NODE_ENV="development"
if [ ! -d "node_modules" ]; then
npm install
npm --prefix "$HOME" install
else
echo "node_modules folder is already present"
fi
Expand All @@ -51,4 +53,4 @@ echo ""
echo "###################################"
echo " building the server"
echo ""
npm run build-server
npm --prefix "$HOME" run build-server

0 comments on commit 3cb208b

Please sign in to comment.