Codersquare is a social web app for sharing learning resources in hacker news style by making posts with avilability to comments on as well as votes/likes.
It's and implementation of the original Codersquare prject in javascript and nodejs with express.
A simple HTTP server is responsible for authentication using JWT, serving stored data, and potentially ingesting and serving analytics data.
Used technologies: Javascript, Node.js, Express.js, Sequelize, Jest
You can find a file for swagger API documentation here.
Users:
/users/login [POST]
/users/signup [POST]
Posts:
/posts/:id [GET]
/posts/:id [DELETE]
/posts/ [POST]
/posts/ [GET]
Comments:
/comments/:id [GET]
/comments/:id [DELETE]
/comments/ [POST]
Likes:
/likes/:id [GET]
/likes/ [DELETE]
/likes/ [POST]
We'll use a relational database (schema follows) with sqlite3.
- First you need to clone the repo:
$ git clone https://github.com/Zaher1307/codersquare.git
- Install dependencies
$ npm install
- Start server -> will listen on port 3000
$ npm start
Finally you can use postman or build your client to test this API or you can use this client codersquare.