Skip to content

tmciver/node-solid-server

Repository files navigation

ldnode

Build Status NPM Version Gitter chat

Linked Data Platform server based on rdflib.js and node.js. This is all you need to run distributed linked data apps on top of the file system.

Features

  • GET, PUT and PATCH support
  • Proxy for cross-site data access
  • Access control using RDF ACLs
  • WebID Authentication
  • Real-time live updates (using websokets)
  • Mount as express' router

Install

npm install

Usage

Library

Simple

var ldnode = require('ldnode')

var ldp = ldnode.createServer()
ldp.listen(1234, function() {
  // Started Linked Data Platform
})

Advanced

You can integrate it with your existing express app

var ldnode = require('ldnode')
var app = require('express')()
app.use('/test', ldnode())
...
Logging

If you are running your own app

$ DEBUG="ldnode:*" node app.js

or simply

$ ldnode -v

Command line tool

npm install -g ldnode

The command line tool has the following options

Usage: ldnode [options]

Options:
   -v, --verbose           Print the logs to console
   --version               Print current ldnode version
   -m, --mount             Where to mount Linked Data Platform (default: '/')
   -r, --root              Root location on the filesystem to serve resources
   -p, --port              Port to use
   -c, --cache             Set cache time (in seconds), 0 for no cache
   -K, --key               Path to the ssl key
   -C, --cert              Path to the ssl cert
   --webid                 Enable WebID+TLS authentication
   -s, --secret            HTTP Session secret key (e.g. "your secret phrase")
   --no-live               Disable live support through WebSockets
   -sA, --suffix-acl       Suffix for acl files (default: '.acl')
   -sC, --suffix-changes   Suffix for acl files (default: '.changes')
   -sE, --suffix-sse       Suffix for SSE files (default: '.events')

Tests

The tests assume that there is a running ldnode.

$ npm test
# running the tests with logs
$ DEBUG="ldnode:*" npm test

License

MIT

About

Solid server on top of the file-system in NodeJS

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • JavaScript 92.8%
  • HTML 6.3%
  • Other 0.9%