This app is an online training app for front end. The backend developed for this project is not complete and includes only the required APIs for this app to work. The list of packages and technologies used is mentioned at the down of the page.
In order to make this project works in your local machine, you need some requirements :
- Node JS : download and install nodeJS
- Mongo DB : download and install MongoDB
- Studio 3T (a shell-centric cross-platform MongoDB management tool) : this item is optional, in case if you want to use provided database file and have no expertise to import database file from CMD or terminal, you will need this GUI. download and install studio3T
- A text editor like vsCode
open your terminal and insert following commands:
git clone https://github.com/alibkm95/teach-me-online.git
npm install
npm install nodemon --save-dev
cd ./frontend
npm install
- import TEACH_ME.agz - importing database guide
- use BSON-mongodump archive to import
- copy your mongoURI. it must be a string like this :
mongodb://<username>:<password>@<host>:<port>/<database>?<options>
in your root directory, create a new file and name it .env
then set the following variables in the file.
MONGO_URI
=your connection stringCOOKIE_SECRET
=encryption key for cookies. you can get a random secret from hereJWT_SECRET
=encryption key for tokens. you can get a random secret from hereEMAIL_SERVICE
=gmail
(you can use gmail accounts for sending email in nodemailer here is a guid for setup gmail account)EMAIL_HOST
=smtp.gmail.com
EMAIL_HOST_PORT
=the port of email host (usualy its 587)EMAIL_AUTH_USER
=the gmail accounts user name ([email protected])EMAIL_AUTH_PASSWORD
=the gmail app password that you got from your google account earlierPORT
=5000
the port of backend server works with.
open new terminal and insert following commands:
npm run dev
open new terminal and insert following commands:
cd ./frontend
npm run dev