New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@treecg/basic-ldes-server

Package Overview
Dependencies
Maintainers
7
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@treecg/basic-ldes-server

Implement the Source class to generate a 1 dim paginated Linked Data Event Stream from your dataset

latest
Source
npmnpm
Version
1.1.10
Version published
Maintainers
7
Created
Source

Basic LDES server

A Basic LDES is a 1 dimensional pagination of an event stream’s full history and latest objects. The Basic LDES server can be used to map your back-end system to a Basic LDES HTTP server by implementing the Source class.

A Linked Data Event Stream (LDES) is a collection of immutable objects. The HTTP interface adheres to the LDES specification by SEMIC. An LDES can be fragmented in different ways using the TREE specification. Check the TREE Linked Data Fragments website for more background and implementations.

Installation

npm

npm i @treecg/basic-ldes-server

yarn

yarn add @treecg/basic-ldes-server

Usage

Running from config file

let app = require('@treecg/basic-ldes-server')
const AppRunner = app.AppRunner;

new AppRunner().run("./config/config.json");

Config file

{
    "app": {
        "port": 3000
    },
    "db": {
        "host": "<location to sqlite db>"
    },
    "entrypoint": "https://www.example.com/"
    "sources" : [ 
        {
            "route": "/endpoint-route", //relative endpoint route
            "sourceFile": "<relative path to compiled Source implementation in dist folder>",
            "usesImportPages": <boolean>,
            "importInterval": <importPages interval> //time between calls to importPages
        },
        ...
    ]
}

Boilerplate implementation

Boilerplate

Examples

Examples

Development

git clone https://github.com/TREEcg/Basic-LDES-Server.git 
yarn install
yarn run dev

Publishing

Test packaging

yarn run build && npm pack

yarn run publish

Authors

FAQs

Package last updated on 08 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts