Micro-service for proxying Europeana edm:hasView
and edm:isShownBy
web
resources from providers' websites.
Documentation is available at https://europeana.github.io/media-proxy.js/api/.
- Node.js 18
- Data store credentials; one of:
- Europeana item metadata MongoDB access credentials (recommended)
- Europeana API key
Configuration is by environment variable.
Either a Europeana item metadata MongoDB, or a Europeana Record API is required as a data source. MongoDB is recommended.
APP_DATA_SOURCE=mongodb
MONGODB_DATABASE=europeana-item-metadata
MONGODB_URI=mongodb://user:pass@server1.example.org:27017,server2.example.org:27017
APP_DATA_SOURCE=record-api
EUROPEANA_API_KEY=YOUR_API_KEY
EUROPEANA_API_URL=https://api.europeana.eu/record
Should you need to permit the use of alternative Europeana Record APIs on a per-request basis, these need to be specified as a comma-separated list:
EUROPEANA_PERMITTED_API_URLS="https://api2.europeana.eu/record,https://api3.europeana.eu/record"
To enable transaction logging to Elastic APM:
ELASTIC_APM_SERVER_URL=https://apm.example.org
ELASTIC_APM_LOG_LEVEL=info
ELASTIC_APM_ENVIRONMENT=development
The Europeana Media Proxy is written as an Express.js app for Node.js.
npm ci
- Building for production uses rollup
- Running in production does not support use of .env files
npm run build
npm run start
The service will be available at http://localhost:3000/
- Runs with hot-reload of source
- .env file support
npm run dev
The service will be available at http://localhost:3000/
Run unit tests:
npm run test
Documentation is generated by RapiDoc from the OpenAPI Specification v3 manifest in ./docs/api/openapi.yaml
. To view locally, run the documentation web server:
npm run docs
The documentation will now be available at http://localhost:4000/. Reload the page after making changes to the manifest to see the latest documentation.
Licensed under the EUPL v1.2.
For full details, see LICENSE.md.