Simple Blog - Backend

createPost

  • Url

    /create
  • Method

    Post
  • Success response

    • Code: 200 Content:
      {
        message: "Success! A new post has been created",
        post: newPost,
      }
      
  • Error response

    • Code: 404

getAllPosts

  • Url

    /
  • Method

    Get
  • Success response

    • Code: 200 Content:
      { message: "Success! All posts have been queried", posts }
      
  • Error response

    • Code: 404

getSinglePost

  • Url

    /get
  • Method

    Get
  • Success response

    • Code: 200 Content:
      { message: "Success! A post has been queried", post }
      
  • Error response

    • Code: 404

Installation and Buildings

Interested on running this project locally? Here's how.

# Clone this repository
git clone https://github.com/taufikalgi/simple-blog-backend
cd simple-blog-backend

# Install required dependency
npm install

# Run
npm start

Click Simple Blog - Frontend for the frontend