Clone the repository:
git clone git@github.com:hownowbrowncow/ripstech-test.git
Install dependencies:
composer install
yarn OR npm install
Build frontend assets:
NODE_ENV=production gulp
Database config is set to use postgres. After creating a table and user run:
bin/console doctrine:database:create
Validate and update database schema:
bin/console doctrine:schema:update --force
bin/console doctrine:schema:validate
Add geolocation data:
bin/console maxmind:geoip:update-data http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
There are 3 endpoints available
description: Returns info on available endpoints and request parameters.
description: Returns a collection of point data.
description: Create a new point record. parameters:
lat:
description: Latitude of new point
type: float
required: false
long:
description: Longitude of new point
type: float
required: false
ip:
description: IP address that will be used for lat/long geolocation
type: string
required: false
icon:
description: Font-Awesome icon used on display marker
type: string
required: false
examples (using curl):
with IP and icon:
curl --data "ip=186.190.128.4&icon=bullseye" http://map.dev/points
with lat/long:
curl --data "lat=41.832284&long=-71.420443" http://map.dev/points