mockk
v1.0.0
Published
Mocking server tool for offline development made offline
Downloads
29
Readme
Mockk
Mocking server tool without dependencies for offline development made in offline.
Installation
npm i -g mockk
Usage
Create request/response mock config in mockk.conf.js
file:
/*
Template:
{
'URL': {
'HTTP_METHOD': 'RESPONSE'
}
}
*/
'use strict';
module.exports = {
'/': {
'GET': 'Hello!'
},
'/users': {
'POST': {
'message': 'OK!',
'code': '200'
}
},
'/users/bob': {
'GET': require('./user-bob')
}
};
Run mock server:
mockk --config path/to/mockk.conf.js
or, if you are in same dir as mockk.conf.js
file:
mockk