http://hacktivoverflow.ibrahim.cool/
-
Before run this you should:
run this on server: $ npm install
run this on server: $ npm run dev or npm start
run this on client: $ npm run serve
-
Access point:
client: http://localhost:8080
server: http://localhost:3000
Route | HTTP | Header(s) | Body | Response |
---|---|---|---|---|
/users | POST | none | name: String email: String password: String |
Success: 201: Object User Error: 400: Validation Error 500: Internal server error |
/users/login | POST | none | email: String password: String |
Success: 200: Access token, Object User Error: 500: Internal server error 400: Username / Password wrong |
Route | HTTP | Header(s) | Body | Response |
---|---|---|---|---|
/answers/:id | GET | none | none | Success: 200: Object answer Error: 500: Internal server error |
/answers/:id | PUT | token:user | description: String | Success: 200: Object answer Error: 500: Internal server error 400: Validation error |
/answers/:id/upvotes | PUT | token:user | none | Success: 200: Object answer Error: 500: Internal server error |
/answers/:id/downvotes | PUT | token:user | none | Success: 200: Object answer Error: 500: Internal server error |
/answers/:id/ | DELETE | token:user | none | Success: 200: Object answer Error: 500: Internal server error |
Route | HTTP | Header(s) | Body | Response |
---|---|---|---|---|
/questions | GET | none | none | Success: 200: Array of object questions Error: 500: Internal server error |
/questions | POST | token:user | title: String description: String |
Success: 201: Object question Error: 500: Internal server error 400: Validation error |
/questions/:id | GET | none | none | Success: 200: object question Error: 500: Internal server error |
/questions/:id | DELETE | token:user | none | Success: 200: Object question Error: 500: Internal server error |
/questions/:id | PUT | token:user | title: String description: String |
Success: 200: Object question Error: 500: Internal server error |
/questions/:id/upvotes | PUT | token:user | none | Success: 200: Object question Error: 500: Internal server error |
/questions/:id/downvotes | PUT | token:user | none | Success: 200: Object question Error: 500: Internal server error |
/questions/:id/answer | POST | token:user | description: String | Success: 200: Object question Error: 500: Internal server error |