This repository contains a simple Express API using Mongoose for two collections: User and Post.
- Sign Up: Create a new user. (Email must be unique)
- Sign In: Authenticate and log in.
- Update User: Update user information.
- Delete User: Delete a user.
- Search Users by Name and Age: Search for users where the name starts with "X" and age is less than Y.
- Search Users by Age Range: Search for users where the age is between X and Y.
- Get All Users: Retrieve all users.
- Get User Profile with Posts: Retrieve a user's profile along with their posts using populate.
- Add Post: Add a new post. (Make sure the user already exists)
- Delete Post: Delete a post (Post creator only).
- Update Post: Update a post (Post owner only).
- Get All Posts: Retrieve all posts.
- Get All Posts with Owners Information: Retrieve all posts with their owners' information using populate.
- Sort Posts Descending by Date: Retrieve all posts sorted in descending order by date.