This Node.js project implements an API for liking and disliking posts, designed to interact with a database containing user and post data. The API allows users to create posts and express their preferences for those posts by either liking or disliking them.
1. Checking the validity of user and post IDs.
2. Prevent duplicate likes or dislikes by the same user, and update post likes and dislikes counts accordingly.
3. API provides a robust and efficient way for users to interact with posts.
1. Install node js if you haven’t installed it.
2. Install required node packages - express
, mongoose
, body-parser
, nodemon
1. Run the server by using the command npm start