-
-
Notifications
You must be signed in to change notification settings - Fork 399
Deploy in VPS
Tuhin Kanti Pal edited this page Sep 18, 2021
·
11 revisions
- VPS with SSH or Local Machine
- MongoDB
- YouTube Data API Key
- Open
https://cloud.mongodb.com
- Click the
Try MongoDB Cloud Now
Button - Now you can Fill the Form or Sign Up with Google
- After Successfully Signed Up Type any Organization Name, Project Name and select any preferred language and click
Continue
- You can see a Pricing Page select
Free
and clickCreate a Cluster
- Select any datacenter's location and any cloud service provider and click
Create Cluster
- Now you will see a cluster is creating
- click
Network Access
in Sidebar & clickAdd IP Address
- Now click
ALLOW ACCESS FROM ANYWHERE
andConfirm
that - Click
Database Access
in Sidebar & clickAdd New Database User
- Now in Password Authentication Method type a Username and a Password and click
Add User
- Click
Clusters
in Sidebar & clickconnect
& SelectConnect your application
- Now you will see an URL containing
mongodb+srv://
Copy that and replace< password >
with Your Previously chosen password (If you used any special character in password you have to url encode the password) - You need this MongoDB URL to deploy Whatsbot
- Open
https://console.cloud.google.com/
& create a project - Go to
Apis & Services
and searchYoutube Data Api
you will foundYouTube Data API v3
select that and enable that - Now again go to
Apis & Services
clickCredentials
and clickCREATE CREDENTIALS
& selectAPI Key
- An API Key will be displayed Copy That it will need while you deploy Whatsbot
- Require NodeJS and NPM
https://nodejs.org/
- Clone the Repo
git clone https://github.com/TheWhatsBot/WhatsBot.git
- Go To its directory
cd WhatsBot
- Install Requirements
npm install
- Run
genToken.js
and scan the QR using your Phone's Whatsapp Web and copy the output after a successful try
npm run gentoken
-
After authenticated see your personal chat on WhatsApp you will see your session.
-
Rename
example.env
to.env
and fill everything -
Start the server (Development)
npm start
- Start the server (Using ForeverJS)
npm install forever -g
forever start main.js