0.1.0 • Published 11 years ago
connect-mock v0.1.0
connect-mock
Connect middleware for easy file-based API mocking
Usage
First, add files containing your API mock responses to a mock
directory.
Then, require
it and call it as a function, passing options.
mock = require('connect-mock')
options = {
mockDirectory: 'mocks/',
verbose: false
}
middlewares.push[mock(options)]
Important: If you expect an answer from a endpoint which collides with a directory,
you can use a file with the same name as the directory. See examples in mock/
folder.
0.1.0
11 years ago