Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nicorobo/mirageo-server
🌐 A server/interface for fake location data created by Mirageo.
https://github.com/nicorobo/mirageo-server
Last synced: 24 days ago
JSON representation
🌐 A server/interface for fake location data created by Mirageo.
- Host: GitHub
- URL: https://github.com/nicorobo/mirageo-server
- Owner: nicorobo
- Created: 2017-03-02T04:26:19.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-11T05:00:34.000Z (almost 8 years ago)
- Last Synced: 2024-11-24T09:41:40.131Z (about 1 month ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/mirageo-server
- Size: 2.03 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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`.
```js
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](http://g.recordit.co/tUtfJRloAj.gif)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](https://www.mapbox.com), find your access token, and add it using:
```
mirageo-server --map-key
```
The token will be stored locally using [lowdb](https://github.com/typicode/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.