Skip to content

ercanakalar/BlogApi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blog Application - Full Stack Project

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.

Backend Setup

  1. Navigate to the backend directory:

    cd blog
  2. Restore dependencies:

    dotnet restore
  3. Create the database table:

    dotnet ef migrations add InitialCreate
  4. Update the database:

    dotnet ef database update
  5. Run the backend:

    dotnet run

Frontend Setup

  1. Navigate to the frontend directory from the project root:

    cd frontend
  2. Install dependencies:

    npm install
  3. Run the frontend:

    npm run dev

Blog Posts

  • 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).

Comments

  • 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.

Features

  • 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages