Stackoverflow-api is an API implementing lite version of stackoverflow
- User can create account.
- User can log in.
- User can ask question.
- User can answer a question.
- User can view all questions.
- User can view a specific question with answers.
- User can upvote or downvote question or answer.
- User can search for questions, users, answers
- User can be notified by email when an answer is posted on user's question if he subscribed to it when asking the question.
The API Documentation can be found on http://127.0.0.1:9090/api/docs when the app is started.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
What things you need to install the software and how to install them To get the project up and running, you need to have mongodb, nodejs and npm installed on your local machine.
Run the following commands to confirm installations.
node -v
- should display Node version
npm -v
- should display npm version
mongo --version
- should display mongdb version
- Clone the repository
git clone https://github.com/kenzdozz/stackoverflow-api.git
- Navigate to the location of the folder
- Run
npm install
to install dependencies - Run
npm start
to get the app started on your local machine
Rename .env.example
to .env
and update the variables accordingly
To run the tests, run the command
npm run test
The tests, test the api endpoints to ensure that it works and returns the required data.
- Nodejs - Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine
- Express - Fast, unopinionated, minimalist web framework for Node.js
- MongoDB - MongoDB is a cross-platform document-oriented database program
- JWT - JSON Web Token for aunthentication
- Onah Kenneth - Initial work - stackoverflow-api
This project is licensed under the MIT License