Stackoverflow-clone is a platform where people can ask questions and provide answers.
- Users can create an account and log in.
- Users can ask questions on the platform.
- Users can view all questions asked on the platform.
- Users can upvote or downvote a question.
- Users can provide answers to questions asked on the platform.
- Users can search for questions, answers and users on the platform
- Users can subscribe to a question and be notified when an answers is provided.
Install node
, version 8 or greater
Clone the repo:
git clone https://github.com/fejroofficial/stackoverflow-clone.git
Start server:
npm start
- Mocha - A Javascript test framework.
- Chai - A BDD / TDD Assertion library.
- Istanbul - Javascript code coverage tool.
- nyc - The Istanbul command line interface.
Routes
-
POST
/api/v1/auth/signup
Use this route to create a new user account. The following fields are required:firstName
The firstname of the userlastName
The lastname of the useremail
The email of the userpassword
The user's password
-
POST
/api/v1/auth/login
Use this route to create a new user account. The following fields are required:email
The email or username of the userpassword
The user's password
-
POST
/api/v1/questions
Use this route to create a question. The following fields are required:title
The title of the question to be askeddescription
The description of the question to be asked
-
POST
/api/v1/questions/:id/answers
Use this route to post an answer to a question. The following fields are required:answer
The answer to be provided for a question
-
POST
/api/v1/questions/:id/votes
Use this route to upvote or downvote. The following fields are required:vote
Boolean(True for upvote, False for downvote)
-
POST
/api/v1/questions/:id/subscribe
Use this route to subscribe to a question. -
GET
api/v1/questions
Use this route to view all questions. -
GET
api/v1/search?question|answer|user
Use this route to search for either questions or answers or users but not both.
ApI for this app is available at stackoverflow-clone