Skip to content

Latest commit

 

History

History
75 lines (55 loc) · 2.22 KB

README.md

File metadata and controls

75 lines (55 loc) · 2.22 KB

stack-overflow-api-clone

The API provided is a replica of Stack Overflow, designed to assist users in finding timely and relevant answers to their questions. It is developed using a technology stack comprising MongoDB, Express, Vue.js,Node.js, and Mongoose, known as the MEVN stack. This combination of technologies enables efficient data storage and retrieval, seamless communication between the client and server, and easy management of the API's functionality.

st1

st2 st3 st4 st5 e-430171df01fe.png)

)

Features

CRUD (Create, Read, Update And Delete)>

  • Authentication with JWT (Reset Password with email)
    • Login
    • Register
    • Forgot Password
  • API Security (NoSQL Injections, XSS Attacks, http param pollution etc)
  • Ask Question
  • View Questions
  • Upvote or downvote question
  • Answer Question
  • Search (Questions,Tags, Answers and Users)

Stack

  • NodeJS
  • Authentication with jsonwebtoken
  • MongoDB
  • ExpressJS
  • Mongoose

Configuration File

Rename the config/.env.example to .env, then modify to your environment variables, mongodb uri, set your JWT_SECRET and SMTP variables

    NODE_ENV=development
    PORT=3000
    MONGO_URI=YOUR_URL
    
    JWT_SECRET=YOUR_SECRET
    JWT_EXPIRE=30d
    JWT_COOKIE_EXPIRE=30
    
    SMTP_HOST=smtp.mailtrap.io
    SMTP_PORT=2525
    SMTP_EMAIL=
    SMTP_PASSWORD=
    [email protected]
    FROM_NAME=wastech

HTTP Requests

All API requests are made by sending a secure HTTPS request using the GET, POST, PUT methods to work with the 3 resource

  • Users
  • Questions
  • Answers
  • Comments
  • Tag

Installation

Install all npm dependecies

npm install

Install nodemon globally

npm install -g nodemon