Skip to content

delta62/mb-promise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status npm version

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.

About

Thin promise wrapper around Mountebank

Resources

License

Stars

Watchers

Forks

Packages

No packages published