1.0.2 • Published 5 months ago

mountebank-client v1.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

Mountebank Client

A TypeScript client for Mountebank API that provides a fluent interface for creating and managing mock services.

Installation

npm install mountebank-client

Usage

import { startMountebank, StubBuilder, ImposterBuilder } from 'mountebank-client';

const stub = new StubBuilder().get('/welcome').response({
    status: 200,
    body: { 
        message: 'Welcome!' 
    }
});

const imposter = new ImposterBuilder({
    port: 7117,
    protocol: 'http',
    name: 'Example API'
}).addStub(stub);

startMountebank({
    port: 2525,
    imposters: [imposter]
}).then(() => console.log('Mountebank Running!'));

See the examples directory for more usage examples.

1.0.2

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago