/question-answer-rest-api

Question Answer Rest Api which allows you to login, register , reset password, ask question , answer question , like / dislike answer / question and etc

Primary LanguageJavaScript

Question Answer Rest Api


This is a rest api which allows you to :

  • In account Section you can :

  • > Register
  • > Login
  • > Edit your profile
  • > Add profile image, place , about section etc
  • > Reset Password With Email Verification

  • In Question Section you can :

  • > Ask Questions
  • > Edit Your Question
  • > Delete Your Question
  • > See other Questions
  • > Like/Undolike Questions
  • > Search and filter Questions by title

  • In answer Section you can :

  • > Answer Questions
  • > Edit Your Answers
  • > See other Answers
  • > Like/Undolike other Answers
  • > Filter other Answers by content and user

  • In moderation Section you can :

  • Admin Section that allow you to :
  • >Delete others questions
  • >Delete others answers
  • >Block a user

HOW TO USE IT


First off all, you need to add these thing to environment variables (or create "Config/config.env" to main folder)

  • >PORT
  • >NODE_ENV("development" or "production")
  • >MONGO_URI (local or from mongo)
  • >JWT_SECRET_KEY
  • >JWT_EXPIRE(ex. 10m)
  • >COOKIE_EXPIRE(ex. 10 for 10 seconds)
  • >RESET_PASSWORD_EXPIRE(ex. 36000 for 1 hour)
  • FOR NODEMAILER (that is how we reset email with email)

  • >SMTP_HOST (ex smtp.gmail.com)
  • >SMTP_PORT (ex. 587)
  • >SMTP_USER (ex. yourmail@email.com)
  • >SMTP_PASS (ex. yourpassword123!)

Then install the necessary packages

Finally open your terminal and type npm run start


Made by MaliBYK