Skip to content

Commit

Permalink
Merge pull request #2 from Steveorevo/master
Browse files Browse the repository at this point in the history
Security issue
  • Loading branch information
cristiancosano committed Apr 4, 2023
2 parents 8ac7a17 + 4e5a77b commit 6f45457
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions NodeJS.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ if [ -d "$nvmDir" ]; then
if [ ! -d "/opt/nvm/versions/node/$nodeVersion" ]; then
echo "Install this version"
nvm install $nodeVersion

chmod -R 777 /opt/nvm
chmod -R 755 /opt/nvm
else
echo "Error on install Node version on NVM"
fi
Expand Down Expand Up @@ -90,7 +89,7 @@ sleep 5

if [ ! -f "$nodeDir/app.sock" ]; then
echo "Allow nginx access to the socket $nodeDir/app.sock"
chmod 777 "$nodeDir/app.sock"
chmod 755 "$nodeDir/app.sock"
else
echo "Sock file not present disable Node app"
runuser -l $user -c "pm2 del $scriptName"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# HestiaCP with Node.JS support.

With this repo you can run multiples NodeJS Apps at same time.
This template read `.env` file, `.nvm` for Node version, and `package.json` for get info and auto install modules.
This template reads the `.env` file, `.nvm` for Node version, and `package.json` to get info and automatically install modules.

![HestiaCP](https://logico.com.ar/img/2019/04/21/vestacp_proxy_setup.png)

Expand All @@ -11,7 +11,7 @@ https://logico.ar/blog/2019/04/20/soporte-para-aplicaciones-nodejs-en-vestacp
## Installation

***Auto "With Script":***
* First download this Git in your `home` directory and run `chmod +x ./install.sh`, `./install.sh`. Script auto install `NVM` and `PM2`
* First download this Git in your `home` directory and run `chmod +x ./install.sh`, `sudo ./install.sh`. Script auto install `NVM` and `PM2`

***Manually:***
* Install PM2 `npm i pm2@latest -g`
Expand Down
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if [ ! -f ~/.nvm/nvm.sh ]; then


mv ~/.nvm /opt/nvm
chmod -R 777 /opt/nvm
chmod -R 755 /opt/nvm

echo "-> Add this lines to the end your ~/.bashrc file"
echo 'export NVM_DIR="/opt/nvm"
Expand Down

0 comments on commit 6f45457

Please sign in to comment.