-
Clone this repository or fork it.
- To clone this repository type
git clone https://github.com/Ak-Srivastav/OTPVerification.git
on your command line - To fork this repository, click fork button of this repository then type
git clone https://github.com/<your username>/OTPVerification.git
- To clone this repository type
-
Inside your project folder, create a new file named
.env
which stores informations about server side such asMONGO_URI
, -
Rename .envexample to .env after setting.
-
JWT_SECRET
andPORT
,etc
informations- store your database URI inside
MONGO_URI
variable - store your security key inside
JWT_SECRET
variable - example:
MONGO_URI = mongodb+srv://<username>:<password>@<collection_name>.<providedbymongodb>.mongodb.net/ (MongoDB Atlas) or MONGO_URI = mongodb://127.0.0.1:27017/otpverification (MongoDB Compass) PORT = 3000 TOKEN_EXPIRE_TIME = 1h JWT_SECRET = thisismysecret SERVICE= gmail (your mail provider) HOST= smtp.gmail.com (this is an example) USER= [email protected] (host mail id) PASS= this isan exam ple (application password nodemailer) name= Amitkumar Srivastav (name of the host) ADDRESS= [email protected]
- store your database URI inside
-
Install all dependencies
- Server side: on the
project
directory typenpm install
- Server side: on the
-
Run it on node js:
- Server side: on the
project
directory typenpm start
- Server side: on the