You can Sign Up first. Then, It will route you to the blog page. You can see the all blogs with the user, the count of the comment, and some info of the blog. There also have a route to Read More to go to the blog's page. You can reach the blog and it's comments. Also, the user can comment.
-
Navigate to the backend directory:
cd blog -
Restore dependencies:
dotnet restore
-
Create the database table:
dotnet ef migrations add InitialCreate
-
Update the database:
dotnet ef database update
-
Run the backend:
dotnet run
-
Navigate to the frontend directory from the project root:
cd frontend -
Install dependencies:
npm install
-
Run the frontend:
npm run dev
GET /api/blog: Fetch all blog posts.GET /api/blog/{id}: Fetch a specific blog post by ID.POST /api/blog: Create a new blog post (Requires authentication).PUT /api/blog/{id}: Update a blog post (Requires authentication).DELETE /api/blog/{id}: Delete a blog post (Requires authentication).
POST /api/blog/comment: Add a comment to a blog post (Requires authentication).GET /api/blog/comment/{blogId}: Fetch comments for a specific blog post.
- User Authentication: Users can sign up and log in to manage their blog posts and comments.
- Blog Posts: Users can create, update, and delete their own blog posts.
- Comments: Users can view and comment on blog posts.