Skip to content

rvovard/FeatureService

 
 

Repository files navigation

ODE Feature Service Build Status

REST API for ODE features data

Adapted from Restbase

Installation

Make sure you have node 9+ installed

Debian / ubuntu

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install curl
curl -sL https://deb.nodesource.com/setup_9.x | bash - && apt-get install -y nodejs

From the FeatureService directory, install node dependencies:

npm install

Set up dev & test databases with docker:

docker pull mdillon/postgis
docker run --name devdb -p 127.0.0.1:5432:5432 -d mdillon/postgis
docker run --name testdb -e POSTGRES_USER=test -p 127.0.0.1:5433:5432 -d mdillon/postgis

Use seeding script to setup the dev database and download audio&image files (it is meant to run on a machine with the unzip command).

npm run seed

Start FeatureService:

npm start

The defaults without a config file should work. To customize FeatureService's behavior, copy the example config to its default location:

cp config.example.yaml config.yaml

You can also pass in the path to another file with the -c commandline option to server.js.

Testing

To run all the tests from a clean slate:

npm test

Coverage

To check the test coverage, use npm, then browse the report:

npm run-script coverage

The coverage report can now be found in <project>/coverage/lcov-report/index.html.

Using Knex directly

We use Knex to setup our database, you can migrate and seed for example as follows:

alias knex=node_modules/knex/bin/cli.js
knex migrate:latest
knex seed:run

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 99.8%
  • Shell 0.2%