node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

mockeroni

mockeroni mockeroni

Build Status Release

A recipe for easy mocks.

Installation + Usage

As an npm module:

npm i -D mockeroni

As a CLI util

npm i -g mockeroni

Mockeroni can also be accessed from this heroku link: https://mockeroni.herokuapp.com/

API and Routes

By default, mockeroni will open up a WebSocket at port 8080 (i.e. ws://mockeroni.herokuapp.com:8080), and return the following shape:

{  
  rates: Array<{ id: string, time: number, rate: number }>,  
  graph: {    
    nodes: Array<{ id: number, label: string, species: 'sink' | 'source' | 'firewall'}>    
    edges: Array<{ to: number, from: number }>  
  }
}

in json format. The size of each array can vary. It returns this data at a default of 1 second intervals.