Name: landexplorer-api
Owner: TABLEFLIP
Description: :world_map: A graphql api for the landexplorer data
Created: 2016-12-15 15:07:10.0
Updated: 2018-04-27 11:32:53.0
Pushed: 2017-01-14 21:24:23.0
Homepage: http://landexplorer.uk/
Size: 18992
Language: Shell
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
:world_map: A graphql api for the landexplorer data.
Installing & Running the server
Run the following commands to install and start the service
install && npm start
Usage
For working with the API you can start a dev server that will restart the server after changes using:
run watch
There is a graphical interface that you can use to test your queries. visit localhost:8080/graphiql and type in the following:
spireId(lng: "-1.25390", lat: "51.76110")
The service will return your inspireId for that lng lat
ata": {
"inspireId": "27567047"
Running the tests
To run the tests you will need to create a database in postgres like this:
CREATE DATABASE inspire_tests;
Then connect to inspire_tests
database using \connect inspire_tests;
Now extend the schema definition of inspire_tests to include geometry by using:
CREATE EXTENSION postgis;
To seed the database requires you to have GDAL installed with a Postgres driver
brew install gdal --with-postgresql
You can then seed the database by Running
run seed