Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save alzalabany/d65a1f0c274b118490551c989f3e13a1 to your computer and use it in GitHub Desktop.
Save alzalabany/d65a1f0c274b118490551c989f3e13a1 to your computer and use it in GitHub Desktop.
caddy node pm2 scripts
# Install caddy
```sh
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update
sudo apt install caddy
```
install node
```sh
# Download and install nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
# in lieu of restarting the shell
\. "$HOME/.nvm/nvm.sh"
nvm install 24
node -v # Should print "v24.0.2".
nvm current # Should print "v24.0.2".
npm -v # Should print "11.3.0".
npm i -g pm2
```
@alzalabany
Copy link
Author

npm install -g npm@latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment