한국어 : https://joon610.github.io/sideproject/MockUp-Server
日本語 : https://qiita.com/joon610/items/f5aae93815b536a3f56b
Startindex.json- set response Data
setting.json- set header, cookies
- set Api description
- set dynamic Route key
Get Post Put Delete- Create, Read, Update, Delete example
- created directory.
- make index.json file in each directory
- If you want to configure more, and then add error.json, setting.json
- Mockup Server start!
// setting header, cookies, api description etc
{
"header": {
"Content-Type": "application/json; charset=utf-8",
"Content-Length": "123",
"ETag": "12345"
},
"cookies": [
{ //cookie1
"cookiekey": "cookieName",
"options": {
"maxAge": 30000
}
},
{ //cookie2
"hello": "hi",
"options": {
"maxAge": 10000
}
}
],
"dynamicRoute":"hello", // ex) localhost/bla/:hello
"description": "this API is holy shit" // api description
}// index.json
[
{
"id": "1",
"name": "Sara",
"age": "13"
},
{
"id": "2",
"name": "teddy",
"age": "14"
}
]- http://localhost:9000/nice2/test if you send params object, and then add object in response data (POST)
//response data
[
{
"id": "1",
"name": "Sara",
"age": "13"
},
{
"id": "2",
"name": "teddy",
"age": "14"
}
]//response data
[
{
"id": "1",
"name": "Sara",
"age": "13"
}
]//request data
{
"id": "3",
"name": "Sara",
"age": "13"
}//response data
[
{
"id": "3",
"name": "Sara",
"age": "13"
},
{
"id": "2",
"name": "teddy",
"age": "14"
}
]//response data
[
{
"id": "2",
"name": "teddy",
"age": "14"
}
]- Mac, Windows:
- request parameter check
- delay response
- request parameta log
MIT License
yarn install
yarn dev
build:electron