StackOverflow-Backend is the backend implementation of a simple clone of Stackoverflow. It was built from scratch using MongoDB , mongoosejs , JavaScript and Node.js
MongoDBmongoosejsJavaScriptNode.jsExpress frameworkLink to app on heroku.
POSTMAN API documentation here
| HTTPS | ENDPOINT | DESCRIPTION |
| GET | / | Default route |
| POST | /users | User Registration |
| POST | users/login | Login User |
| POST | /users/facebook | Social login |
| POST | /questions | Create a question |
| GET | /questions/ | Fetch all questions |
| GET | /questions/:questionId | Fetch the details of a particular question |
| POST | /questions/:questionId/upvote | Upvote a question |
| POST | /questions/:questionId/downvote | Downvote a question |
| POST | /questions/:questionId/answers | Answer a question |
| GET | /search | Search for questions, answers or users |
| POST | /questions/:questionId/subscribe | Subscribe to a question |
Everything works as expected; However:
In order to install and run this project locally, you would need to have the following installed on your local machine.
git clone https://github.com/oyedejipeace/stackoverflow-backend.git
cd stackoverflow-backend
Run npm install or yarn to install the projects dependencies
create a .env file and copy the contents of the .env.sample file into it and supply the values for each variable
cp .env.sample .env
Create a MongoDB database
Run npm run dev to start the app in development
Once the server starts-up, you can query the api at http://localhost:3001/ using the end points stated above.
docker build -t stackoverflow-backend .
docker run --rm -p 8000:80 stackoverflow-backendnpm test or yarn testFeel free to 🍴 fork this repository
👯 Clone this repository to your local machine using
https://github.com/fire-cracker/stackoverflow-backend.git
Make Contributions
🔃 Create a new pull request using
https://github.com/oyedejipeace/stackoverflow-backend/compare
Content type
Image
Digest
Size
372.2 MB
Last updated
almost 7 years ago
docker pull oyedejipeace/stackoverflow-backend