Your D1 Database contains the following data:
> SELECT * FROM comments;
[
{
"id": 1,
"author": "Kristian",
"content": "Congrats!"
},
{
"id": 2,
"author": "Serena",
"content": "Great job!"
},
{
"id": 3,
"author": "Max",
"content": "Keep up the good work!"
},
{
"id": 4,
"author": "Ron",
"content": "hiiii\r\n"
},
{
"id": 5,
"author": "testing",
"content": "1251"
},
{
"id": 6,
"author": "Test",
"content": "Test"
},
{
"id": 7,
"author": "Test2",
"content": "Test2"
}
]
Build a comments API with Workers and D1