mb-promise
v0.1.0
Published
Thin promise wrapper around Mountebank
Downloads
5
Readme
mb-promise
This package exposes a simple JavaScript API around the popular Mountebank stub server.
Usage
const mb = require('mb-promise');
// Start up a mountebank instance with the default options. Returns a
// Promise so that you can respond to a successful start asynchronously.
mb.start().then(...);
// Pass custom configuration options into Mountebank. See the Mountebank
// documentation for more information.
mb.start({ loglevel: 'warn' }).then(...);
// You can also tell mb-promise when to stop the stub server. Returns a promise.
mb.stop().then(...);
Known Issues
Mountebank keeps a hold on its log file after the main server process exits, so starting a Mountebank instance shortly after one was stopped may result in an error from the logger. There are commits in Mountebank that completely disable logfiles, but they have not been released yet.