Something very similar already exists: 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.