3 ms·
Show HN: Service Mocker – Mock your API server inside the browsers
- sapeien 10y agoSomething very similar already exists: https://github.com/pretenderjs/pretender https://github.com/pretenderjs/pretender I don't think it's a good idea in general to mock server responses because they are subject to change while the mocks don't, better to just run the server and make a real request.
- Dolphin_Wood 10y agoThe main difference between Service Mocker and pretender is that we are using service worker API, therefore the HTTP requests and responses are real and can be inspected in devtools. And usually, we mock an API while the server isn't ready to use. For example, when you just started a new project with backend dudes, it's highly possible that the server is unusable for the first few days, that is the best time to mock your APIs with such a tool :).