API Dummy
API dummy can be implemented in various ways, depending on the specific requirements of the project.
Overview
How to use
Step 1: Create a mock data file
{
"posts": [
{
"id": 1,
"title": "Post 1",
"body": "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
},
{
"id": 2,
"title": "Post 2",
"body": "Sed ut perspiciatis unde omnis iste natus error sit voluptatem."
},
{
"id": 3,
"title": "Post 3",
"body": "Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia."
}
]
}Step 2: Create an API route
Step 3: Test the API route
Last updated