mockk

1.0.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i mockk

Weekly Downloads

2

Version

1.0.0

License

MIT

Last publish

Collaborators

  • roman01la