Build your mock server within 1 minute, Powered by [email protected], Mock.js, Faker, SemanticUI, ACE
//clone
//change to directory
> npm install && node index.js //that's all
And then open http://localhost:3003 in your browser
//path
/people/:name
//mock data
{
"name": "jack"
}
//http://localhost:3003/people/jack
//output: "jack"
//path
/people/:name
//mock data
{
"name": "people - ${name}"
}
//http://localhost:3003/people/jack
//output: "people - jack"
You can utilize all the param variable in mock data, Mock and Faker alse provided.
//path
/people/:name
//mock data
{
"name": "people - ${faker.name.findName()}",
"age": "${Mock.mock('@natural(60, 100)')}"
}
//http://localhost:3003/people/jack
//output:
// {
// "name": "people - Marshall Pfannerstill",
// "age": "94"
// }
MIT
Content type
Image
Digest
Size
284.8 MB
Last updated
over 10 years ago
docker pull firef0x/json-server