zazuko / sparql-proxy

SPARQL proxy middleware
4 stars 1 forks source link

sparql-proxy

This middleware forwards SPARQL queries to a SPARQL endpoint. It supports GET and POST (direct and URL-encoded) query requests and basic authentication.

Usage

The module exports a function to build a middleware. The function must be called with a single options object. The following options are supported:

Example

// load the module
const sparqlProxy = require('@zazuko/sparql-proxy')

// create a middleware instance and add it to the routing
app.use(sparqlProxy({
  endpointUrl: 'https://dbpedia.org/sparql'
})

Debug

This package uses debug, you can get debug logging via: DEBUG=sparql-proxy. Since Trifid makes heavy use of this package, using DEBUG=trifid:* also enables logging in this package.