@r35007/mock-server
Advanced tools
Changelog
v2.0.0
Welcome to v2.0. There are many major changes and bug fix has been done. Please follow the list below
renamed
config.proxy
to config.pathRewrite
log = (req, res, next) => {next()}
;removed
initialMock
, alternateMock
are removed and introduced fetch
globals
, data
, locals
params are removed in middleware method.added
fetch
in routeConfig. Helps to fetch data from Url.mockFirst
in routeConfig. If true, it send you the mock data first. If mock not available then try to fetch the data from fetch
url. By default its false
.res.locals.store.get(key?)
and res.locals.store.store(key, value)
- Helps to store the and share the values between routes inside a middleware.{ routesToLoop?: string[], routesToGroup?: string[] }
as a second param. It helps to set loop and group mock as per the routes provided.Changelog
v1.0.1
transformHar
Bug fix.finalCallBack
to transformHar(harData, entryCallBack, finalCallBack)