Skip to content

Instantly share code, notes, and snippets.

@KTBsomen
KTBsomen / install.sh
Last active September 17, 2024 08:56
install.sh for NodeJS this will install latest version of NodeJS along with pm2 nodemon npm for Linux and also run.sh for running your servers. You can edit this as your needs.
#!/bin/bash
# Function to check if a command exists
command_exists() {
command -v "$1" >/dev/null 2>&1
}
# Function to compare version numbers
version_gt() {
test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1"