anuj123upadhyay / MegaBlog

created a blogging site with all functionality using react and appwrite
https://mega-blog-8587.vercel.app/
14 stars 51 forks source link

Build Backend for Stories Page: Implement POST and GET Routes ✨🚀 #431

Closed Sawan-Kushwah closed 2 weeks ago

Sawan-Kushwah commented 2 weeks ago

Screenshot 2024-11-10 083815

Screenshot 2024-11-10 083933

This PR implements the backend for the Stories page, including the following: GET /api/posts: Fetches all the stories (posts) from the database. POST /api/posts: Allows users to create and save new stories by submitting title, content, and category data. The data is stored in a MongoDB database using Mongoose, and the backend handles both the creation and retrieval of posts.

Changes include:

Creation of routes and controllers for handling posts. Integration of Mongoose for database interaction. Validation to ensure necessary fields are provided before saving a new post.

This sets up the backend to support the stories functionality on the frontend.

vercel[bot] commented 2 weeks ago

@Sawan-Kushwah is attempting to deploy a commit to the Anuj Upadhyay's projects Team on Vercel.

A member of the Team first needs to authorize it.

netlify[bot] commented 2 weeks ago

Deploy Preview for astounding-dodol-3a2762 failed. Why did it fail? →

Name Link
Latest commit a2605ca635c23fb8bac1343fe38f3dd8c17969a4
Latest deploy log https://app.netlify.com/sites/astounding-dodol-3a2762/deploys/67303badb2d90c0008ba1a8f
vercel[bot] commented 2 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mega-blog-8587 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 10, 2024 4:52am
anuj123upadhyay commented 2 weeks ago

use appwrite my dear not mongodb