Public | Automated Build

Last pushed: a year ago
Short Description
Short description is empty for this repo.
Full Description

Collision API

API Specification

=== Incidents

An incident represents one collision, with potentially many parties involved.
Location is presented in standard GeoJSON format.


GET /incidents.json

Example Response

        "coordinates":[118.2, 34.1]
        "coordinates":[118.4, 34.3]


If you are looking to set up your own instance of the API to power your own
visualizations, check ../ops/bin/deploy for a quick idea of how to get a
docker based install up.

If you are looking to develop new features for the API, or would rather not use
docker, then manual setup should be familiar to anyone with experience
deploying rails applications. The only exception is that this application
requires you connect to a PostGIS instance.

This assumes you've previously provisioned a PostGIS instance. I'd recommend
spinning up a docker container like this

$ cd api
$ config/containers/db/

Non-docker database deploments are left as an exercise to the reader.

Once you're database is provisoined, to configure the application server

$ cd api/
$ bin/bundle
$ bin/rake db:setup
$ bin/rails server

You may want to verify that all tests are passing as a sanity check.

$ cd api/
$ bin/rspec
Docker Pull Command
Source Repository