/blog_exam

A blog system exam that I'm taking.

Primary LanguageGo

Setup

Type in "sh start.sh" - boots up your Go and MYSQL environment

*localhost:8080/articles [GET]

Input (N/A):

{}

Output:

{
  "status": 200,
  "message": "Success",
  "data": [
    {
      "id": 2,
      "title": "Serpent's Stone",
      "content": "Tanz",
      "author": "J.K Rowling"
    }
  ]
}

*localhost:8080/articles [POST]

Input:

{
  "title": "Serpent's Stone",
  "author": "J.K Rowling",
  "content": " Tanz"
}

Output:

{
  "status": 201,
  "message": "Success",
  "data": {
    "id": 2
  }
}