mirageo-server
A server/interface for location data created by mirageo
Last updated 3 years ago by nickroberts404 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install mirageo-server 
SYNC missed versions from official npm registry.

mirageo-server

A server/interface for fake location data created by Mirageo.

Installing

  • yarn global add mirageo-server
  • npm install mirageo-server -g

Arguments

  • -c --count <int>: The amount of points to create. Defaults to 100
  • -b --bound <floats>: The bounding box, WSEN. Defaults to [-180, -90, 180, 90]
  • -g --geojson: Send data as geoJSON objects. Defaults to false
  • -p --port <int>: Which port the server will run on. Defaults to 3030
  • -m --map-key <string> Add Mapbox API key for the interface. Defaults to nothing

Example: mirageo-server -c 400 -b 0,30,20,40 -p 8080

This will serve data on http://localhost:8080/data.

fetch('http://localhost:8080/data')
  .then(res => res.json())
  .then(res => {
    res == { // example of data
      data: [{lat: -13.667, lng: 48.956}, ...],
      settings: {
        count: 400,
        bound: [40,0,30,20],
        geojson: false,
        ...
      }
    }
  })

Interface

Demo of mirageo-server interface mirageo-server provides a map interface to visualize the data and change the settings. To use it, you need to create an account with Mapbox, find your access token, and add it using:

mirageo-server --map-key <Access Token>

The token will be stored locally using lowdb, so you will only need that command again to change it.

See the current key saved with mirageo-server --map-key.

Future Plans

I'd like to add motion to the points, giving the tool more real-life applications.

Current Tags

  • 1.3.0                                ...           latest (3 years ago)

8 Versions

  • 1.3.0                                ...           3 years ago
  • 1.2.4                                ...           3 years ago
  • 1.2.3                                ...           3 years ago
  • 1.2.2                                ...           3 years ago
  • 1.2.1                                ...           3 years ago
  • 1.1.1                                ...           3 years ago
  • 1.1.0                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 2
Dependencies (10)
Dev Dependencies (4)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |