Click To Expand
- Node.js Version 22.18 Or Higher, I Recommend the STABLE Version To Get Rid Of Any Errors.
- A VPS would be advised, so you don't need to keep your PC/laptop/RasPi 24/7 online!
- If You Have A VPS Then See This VPS Ubuntu Setup Guide
Click To Expand
-
Package Installation
- Type The Following In Your Console Or Terminal To Install The Required Packages
npm iAfter The Packages Are Installed Ignore The red and yellow errors instead of
npmERRErrors. If You Are Getting This Kind Of Errors Then You Need to read And Understand What Is The Error Like If Any File Is Missing Or Something Like That.- Now, Type The Following In The Console To run the code in development phase
npm run dev- Use this command for Production phase
npm run build- Finally, To Serve the website to a domain
npm run preview -- --host [ip] --port [port]Note:- You Can Also Type
npm run devTo Run the Website
Click To Expand
-
Node.js Installation
- Step 1 – Update the APT index
sudo apt update -ysudo apt clean all -
Install Node.js from the repository
- Execute the commands below as root user.
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo bash -- Once the Node.js repository is configured, install Node.js by executing the commands below:
apt install -y nodejs vim -
Verifing Node.js installation
- To verify Node.js version:
node -vExpected result:
v22.16.0If You Get The Result Something Like This then You Are Good To Go. If NOT Then You Might Not Have upgraded The ubuntu version.
-
Installing pm2 (Process Manager) pm2 Is a Process Manager Which Keeps The Bot On Even IF You Close The Console.
- To Install pm2:
npm i pm2 -g