1.3.0 • Published 3 years ago

sk-resources-fs v1.3.0

Weekly downloads
24
License
Apache-20
Repository
github
Last release
3 years ago

Signal K Resources Provider Plugin:

Resources API provider plugin for Signal K Server.

This Signal K node server plugin acts as a resource provider for the following resource types detailed in the specification:

  • resources/routes
  • resources/waypoints
  • resources/notes
  • resources/regions

as well as allowing the user to define additional paths under /signalk/v1/api/resources to serve user provided resource data sets.

  • example: resources/fishing

Each path is provisioned with GET, PUT, POST and DELETE operations enabled.

Operation of all paths is as set out in the Signal K specification.


Additionally, the path /signalk/v1/api/resources will return an array of ALL available resource paths on the server, not just the ones provided by the sk-resources-fs plugin.

Example:

["buddies","routes","waypoints","notes","regions","tracks","fishing"]

Installation and Configuration:

  1. Install the plugin from the Signal K server AppStore

  2. Re-start the Signal K server to make the plugin configuration available

  3. In the Server -> Plugin Config set the plugin to Active

  4. Select which resource paths you want the plugin to handle: Routes, Waypoints, Notes, Regions.

  5. Specify any additional resource paths you require.

  6. Select the type of resource data store you want to use. (See note below)

  7. Enter the file system path you want to host the resources. (Note: this path will be created if it does not already exist.)

  8. Click Submit

  9. RESTART the server to allow the selected paths to be serviced.


Data Store Options:

This plugin is designed to host / persist resource data in different data store types.

Currently the following data store types are provided:

  1. File System: Choosing this option stores each resource in a file within a folder on your device's file system beneath the path entered in the configuration.

    For example:

    Routes will be stored in <config_path>/routes

    Notes will be stored in <config_path>/notes

    Note: Choose this option if you are moving from GPXLoad. Setting the path to the location used by GPXLoad will make all your existing resources available.

  2. Database: Choosing this option store will use a database provider as the resource store. If the value entered in path is a:

    • file system path on the device: a database store will be cretaed on the file system in the specified path.

    • url: a CouchDB compliant API will be used to interact with a database server at the specified url.


Use and Operation:

Once configured the plugin will handle all of the following requests for the enabled paths:

  • HTTP GET, POST, PUT and DELETE requests
  • Delta GET and PUT requests

Please refer to the Signal K specification for details about working with resources.