$ cd docker/stub-server
$ docker-compose up -d
then... api service start @ port:3030
$ curl -i -X GET 'http://localhost:3030/sampleapi?key=12345'
or
$ curl -i -X POST -H "Content-Type:application/json" -d '{"key": 12345}' 'http://localhost:3000/sampleapi'
response
{
"page": 1,
"total": 5,
"lastPage": 3,
"result": [
{
"text": "data1"
},
{
"text": "data12"
}
]
}
$ docker-compose up -d
$ docker-compose down -v
stub/src/mocky.js
$ cd stub
$ npm start
then... api service start @ port:3000
Please modify as you like. stub/src/mocky.js