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'; moduleexports = '/': 'GET': 'Hello!' '/users': 'POST': 'message': 'OK!' 'code': '200' '/users/bob': 'GET': ;
Run mock server:
mockk --config path/to/mockk.conf.js
or, if you are in same dir as mockk.conf.js
file:
mockk