diff --git a/aws/scripts/after-install.sh b/aws/scripts/after-install.sh index e7c4cfc..82c9aa4 100644 --- a/aws/scripts/after-install.sh +++ b/aws/scripts/after-install.sh @@ -1,2 +1,5 @@ -source /home/ubuntu/.profile -npm i \ No newline at end of file +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion + +npm i diff --git a/aws/scripts/application-start.sh b/aws/scripts/application-start.sh index 3448672..1599a71 100644 --- a/aws/scripts/application-start.sh +++ b/aws/scripts/application-start.sh @@ -1,2 +1,5 @@ -source /home/ubuntu/.profile -npm run start \ No newline at end of file +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion + +npm run start