Last active
November 17, 2022 10:09
-
-
Save mokshchaudhary/23bcb88b095d0ba47952e58e843047b3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install Node and Start Server | |
echo "===============================" | |
echo "|| Starting ||" | |
echo "===============================" | |
echo " " | |
echo "|| Updating ||" | |
sudo apt -qq update -y | |
echo " " | |
echo "|| Install nodejs ||" | |
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - | |
sudo apt-get -qq install -y nodejs | |
node -v && npm -v | |
echo " " | |
echo "|| Making Server ||" | |
cd ~ | |
mkdir server | |
cd server | |
npm init -y | |
npm install express | |
sudo npm install -g pm2 | |
curl https://gist.githubusercontent.com/mokshchaudhary/b11cec107be0344e613a9d6eba7016d2/raw/ac16b634f0d8839049c0a471c1814f8fbbe5eee6/server.js > index.js | |
sudo pm2 start node . --watch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment