gbv / jskos-proxy

HTTP proxy to serve JSKOS objects
https://uri.gbv.de/terminology/
MIT License
3 stars 2 forks source link
coli-conc

jskos-proxy

License License standard-readme compliant

Serve JSKOS objects in multiple formats over HTTP, in particular HTML and RDF

This web service can be put in front of JSKOS data sources to provide RDF serializations and browseable HTML display of controlled vocabularies at a common base URL.

Table of Contents

Install

Clone from git repository.

git clone https://github.com/gbv/jskos-proxy.git
cd jskos-proxy
npm ci

Configuration

Instances of jskos-proxy are configured with environment variables, in local file .env, and files in an optional configuration directory. The following keys are supported:

A configuration directory under config/ can be provided with environment variable CONFIG. It must contain:

The config/ directory already contains some examples for some known terminology services. To try out one of these examples, set nothing but CONFIG, e.g. CONFIG=rvk.

Running

For development:

npm run dev

Most changes should cause either the back-end or the front-end to reload automatically if necessary, but sometimes it might be required to stop and restart the dev server for changes to apply.

For production (less verbose logging, no reload), first build the Vue front-end and then start the server:

npm run build
npm run start

The application should be put behind a reverse HTTP proxy to serve URLs starting with configured NAMESPACE, e.g.

# Apache
ProxyPass /terminology/ http://localhost:3555/terminology/
ProxyPassReverse /terminology/ http://localhost:3555/terminology/

# Nginx
location /terminology/ {
    proxy_pass http://localhost:3555/terminology/;
}

See file ecosystem.example.json for deployment with PM2.

Usage

The proxy translates HTTP requests to an URI query. The URI is determined from query path and configured NAMESPACE or given with optional query parameter uri.

The URI is then looked up in the backend, and returned in a requested RDF serialization format or in HTML. The format is determined based on query parameter format (if given) or HTTP Accept header (otherwise). The following formats are supported:

Related works

See https://bartoc.org/software for a collection of software for knowledge organization systems (aka controlled vocabularies). Browsing interfaces similar to jskos-proxy are provided by Skohub and Skosmos, among other solutions.

Maintainers

License

MIT © 2024- Verbundzentrale des GBV (VZG)