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.
)
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)
- NodeJS
- Authentication with jsonwebtoken
- MongoDB
- ExpressJS
- Mongoose
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
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
Install all npm dependecies
npm install
Install nodemon globally
npm install -g nodemon