Closed kettanaito closed 7 years ago
Yes, but only if it starts automatically with gulp --dev
.
We used something similar for MyMETRO.
My experience:
json-server
gulp --dev
would have been a waste of resources…Is it a real problem the waste of resources?
Well I think there are projects without the need for the mock server.
Having the mock server in gulp --dev pipeline would mean that we need to remove the mock server from gulp pipeline if we don’t need it…
Having the mock server in separate folder (eg. api/index.js
) means either doing nothing or simply removing the folder.
And if needed, we’d simply run eg. npm run mock
. I think is less invasive.
OK, so what about to use the power of yargs
and run it with gulp --dev --api
(or other option name).
Documentation is missing!
D'oh!
It would be useful to have a ready-to-use JSON server for imitating requests and responses.
What do you think about it?