Comment on Everything social media backend
Explore the API docs »
Frontend repo
·
Report Bug
·
Request Feature
Backend services for Comment on Everything social media
API Endpoint : https://comment-on-everything.herokuapp.com
API Documentation : https://documenter.getpostman.com/view/17936847/UVkjwJ2j
To get a local copy up and running follow these simple example steps.
- Clone the repo
git clone https://github.com/OferElfassi/CommentOnEverything.git
- Install NPM packages
npm install
- Add .env file and write your credentials
DB_NAME="********"
DB_USER="********"
DB_PASS="********"
DB_HOST="********"
AWS_BUCKET_NAME="********"
AWS_BUCKET_REGION="********"
AWS_ACCESS_KEY="********"
AWS_SECRET_KEY="********"
In order to use the demo API use the following endpoint - https://comment-on-everything.herokuapp.com
Here's example call to the API:
GET: get posts by hashtag
var settings = {
"url": "https://comment-on-everything.herokuapp.com/api/posts/hashtag/Electronics",
"method": "GET",
"timeout": 0,
};
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"message": "success",
"data": [
{
"_id": "61c59b5e7888c5fc326ddffd",
"description": "Love that series ",
"createdAt": "2021-12-24T10:04:48.413Z",
"image": {
"url": "https://comment-on-everything-bucket.s3.amazonaws.com/99631954-45e2-45f6-a6e8-60a50348a94b.jpg",
"key": "99631954-45e2-45f6-a6e8-60a50348a94b.jpg"
},
"reactions": [],
"comments": [],
"hashtag": "61c592c4186ee007e46fb7fb",
"id": "61c59b5e7888c5fc326ddffd"
}
]
}
For more examples, please refer to the Documentation
Ofer Elfassi - @Linkedin - ofer2212@gmail.com