Skip to content

A simple and convenient way to ask anything, anywhere. It’s way better than pen and paper. You can also say a simple clone of Stackoverflow, but an API.

Notifications You must be signed in to change notification settings

oyedotunsodiq045/softoverflow

Repository files navigation

Build Status

SoftOverflow

SoftOverflow backend API. GitHub Repo.

Quick Start

# Install dependencies
npm i

# Install dev-dependencies
npm i -D nodemon

# Serve on localhost:7000 (development)
npm run dev

# Serve on localhost:7000 (production)
npm start

# Import sample data into mongodb
node seeder -i

# Delete data from mongodb
node seeder -d

Instruction

Note
URL         https://softoverflow.herokuapp.com
URL         https://softoverflow.glitch.me

Testing

Routes Description
Authentication
POST       url/api/v1/auth/register Register a User
POST       url/api/v1/auth/login Login User
GET         url/api/v1/auth/me Get Logged in User
GET         url/api/v1/auth/logout Logout User
Questions
POST       url/api/v1/questions Ask Question
GET         url/api/v1/questions Get All Questions
GET         url/api/v1/questions/:id Get Single Question
Answers
POST       url/api/v1/questions/:questionId/answers Answer Question
GET         url/api/v1/answers Get All Answers
GET         url/api/v1/questions/:questionId/answers Get Answers For Question
GET         url/api/v1/answers/:id Get Single Answer
Ratings
POST       url/api/v1/questions/:questionId/ratings Add Rating For Question
GET         url/api/v1/ratings Get All Ratings
GET         url/api/v1/questions/:questionId/ratings Get Rating For Question
GET         url/api/v1/ratings/:id Get Single Rating
Users
GET         url/api/v1/users Get All Users
GET         url/api/v1/users/:id Get Single User
Advanced Filtering
Questions
GET         url/api/v1/questions?categories[in]=Java Search Questions by category
Answers
GET         url/api/v1/answers?isSolution=true Search Answers by isSolution
Users
GET         url/api/v1/users?role=user Search Users by role
Select, Sorting
GET         url/api/v1/questions?select=question,averageRating
GET         url/api/v1/ratings?sort=createdAt Sort Rating, Ascending
Pagination
GET         url/api/v1/questions?page=2&limit=2
GET         url/api/v1/questions?select=question&page=1
GET         url/api/v1/questions?page=2

About

A simple and convenient way to ask anything, anywhere. It’s way better than pen and paper. You can also say a simple clone of Stackoverflow, but an API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages