1.1.3 • Published 10 years ago

@nkbt/geovis-mock v1.1.3

Weekly downloads
1
License
MIT
Repository
github
Last release
10 years ago

geovis-mock npm

Discord

CircleCI Coverage Dependencies Dev Dependencies

Mock to feed GeoVis server with data

Installation

npm install --global @nkbt/geovis-mock

Usage

Running mock

CLI

> WS_HOST=localhost WS_PORT=10000 geovis-mock

API

const {run} = require('@nkbt/geovis-mock');

const {
  WS_HOST = 'localhost',
  WS_PORT = 10000
} = process.env;

run({WS_HOST, WS_PORT});

Logging

06:38 $ ./bin.js 
connecting to ws://localhost:10000...
connected
>> {"action":"GEO_BROADCAST","payload":[{"srcLat":55.751244,"srcLon":37.618423,"dstLat":49.246292,"dstLon":-123.116226,"value":3}]}
>> {"action":"GEO_BROADCAST","payload":[{"srcLat":50.411198,"srcLon":30.446634,"dstLat":55.751244,"dstLon":37.618423,"value":4}]}
>> {"action":"GEO_BROADCAST","payload":[{"srcLat":-33.865143,"srcLon":151.2099,"dstLat":-12.462827,"dstLon":130.841782,"value":6}]}
disconnected

Development and testing

Currently is being developed and tested with the latest stable Node 6 under OSX.

git clone git@github.com:nkbt/geovis-mock.git
cd geovis-mock
npm install

Tests

# to run tests
npm test

# to generate test coverage (./coverage)
npm run cov

License

MIT

1.1.3

10 years ago

1.1.2

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago

0.1.0

10 years ago