This package has been deprecated

Author message:

BDSM has changed its name, please install mimic to recieve further updates. Please visit https://mimic.js.org for more details

bdsm

1.0.3 • Public • Published

bdsm

Bad ass server mocks

Build Status npm version

short introduction

Using BDSM in your project

Add to your packages:

npm install bdsm --save

Require in your app:

import 'bdsm';

Once you reload the application, the BDSM logo will appear in bottom right corner.

Enjoy!

Using Mocks tracked by git

If you want to use mocks which will be committed into git and you're using webpack you can use the following code to import the mocks on application start:

import bdsm from 'bdsm';
const mocks = require.context(__dirname + '/mocks', true, /\.json$/);
mocks.keys().forEach((key) => bdsm.import(JSON.stringify(mocks(key))));

This assumes your mocks are placed in the mocks directory which is located at the root of the project. In the mocks directory you have exports for either complete scenarios or separate mock requests.

Contributing to BDSM

  1. Clone the repo

  2. Install dependencies (at the root of the repo):

    npm install
    
  3. Run the project

    npm start
    
  4. Build for deployment

    npm run build
    

Dependents (1)

Package Sidebar

Install

npm i bdsm

Weekly Downloads

3

Version

1.0.3

License

MIT

Last publish

Collaborators

  • 500tech
  • morsdyce