JavaScript HTML
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Encounters at an endpoint.

Docker Automated build Docker Build Status


  • HTTP server and command-line RDF tool to get/send, serialise data.
  • Server can receive HTTP HEAD, OPTIONS, GET, POST, PUT requests. Content negotiation with text/turtle, application/ld+json, text/html, application/xhtml+xml. It can serialize from HTML+RDFa, but does not serialize to HTML+RDFa.
  • Spec coverage:
  • No authenication/authorisation mechanism
  • Basic configuration to set constraints on a directory (size/max)
  • Basic configuration to handle stuff like

This server was initially built for LDN tests but then decided to support/test dokieli's needs (source: and do LDP etc.

Dive into issues because it is fun.


If you use Docker, try the image csarven/mayktso:

docker run -p 3000:3000 -d csarven/mayktso

Persistent Docker container

docker volume create mayktso-data
docker run --name mayktso --restart=always \
  --mount source=mayktso-data,target=/mayktso \
  -p 3000:3000 \
  -d csarven/mayktso

To update:

docker pull csarven/mayktso
docker stop mayktso
docker rm mayktso

.. then recreate using the docker run from above.

Installation from source

$ git clone
$ cd mayktso
$ npm install


Server runs on http://localhost:3000/ by default:

$ node index.js


Optional config use: cp config.json.default config.json

  "port": "3000",
  "sslKey": "/path/to/privkey.pem",
  "sslCert": "/path/to/cert.pem",
  "proxyURL": "",
  "rootPath": ".",
  "basePath": "",
  "inboxPath": "inbox/",
  "queuePath": "queue/",
  "maxPayloadSize": 100000,
  "maxResourceCount": 10,
  • Defaults will be used for omitted key/values (except sslKey/sslCert are unused)
  • basePath is useful when running as a reverse proxy in a dedicated directory (e.g., Apache)
ProxyPass /foo/ https://localhost:3000/
ProxyPassReverse /foo/ https://localhost:3000/

so that resolves, otherwise, server only sees /bar e.g., basePath: "/foo/bar/"

  • inboxPath and queuePath are relative to root e.g., http://localhost:3000/{inbox,queue}/

  • queue is used for HTTP 202 responses (default for payload above maxPayloadSize in bytes). Status: Testing

  • rootPath defaults to the current directory (.) or a full path can be specified. Requests are relative to this location.

  • maxPayloadSize is for POSTs (as the name suggests)

  • maxResourceCount is for number of notifications to keep in inbox/ or queue

  • Simple data shape check that's based off 's needs. It is triggered by having a line like this "checkDataShape": [ { "uri": "inbox/" } ]. This needs to be better documented and built further.

Sender and Consumer

Command line

$ node index.js --help
  * Running without parameter/option starts server, otherwise:
  * Usage: node index.js [parameter] [options]
    --discoverInbox <URI>        Discover a target's Inbox
    --getNotifications <URI>     Get the notifications contained in an Inbox
    --head <URI>                 Headers of a URI
    --options <URI>              Check the options of a URI
    --get <URI> [options]        Dereference a resource to RDF
    --post <URI> [options]       Send notification to Inbox
    --put <URI> [options]        Store data under a URI
    --accept (m, default: application/ld+json)
    --contentType (m, default: application/ld+json)
    --slug string
    -d, --data <data>
    -o, --outputType (m, default: application/ld+json)
    m: mimetype or format; jsonld, turtle
$ node index.js --discoverInbox http://localhost:3000/ --accept \
$ node index.js --getNotifications http://localhost:3000/inbox/abc --accept \
$ node index.js --head http://localhost:3000/
$ node index.js --get http://localhost:3000/ --accept application/ld+json
$ node index.js --post http://localhost:3000/inbox/ --slug foo \
--contentType application/ld+json -d \
$ node index.js --put http://localhost:3000/inbox/ --contentType \
application/ld+json -d \

Or just curl:

# Get target URL
$ curl -i -H'Accept: application/ld+json' http://localhost:3000/
$ curl -I -H'Accept: application/ld+json' http://localhost:3000/
$ curl -i -X OPTIONS -H'Accept: application/ld+json' http://localhost:3000/

# Send to Inbox
$ curl -i -X POST -H'Content-Type: application/ld+json' \
-d '[{"@id":"","":"Foo"}]' http://localhost:3000/inbox/
$ curl -i -X POST -H'Content-Type: text/turtle' \
-d '<> <> "Bar" .' http://localhost:3000/inbox/

# Get Inbox URL
$ curl -i -H'Accept: application/ld+json' http://localhost:3000/inbox/
$ curl -i -H'Accept: application/ld+json, text/turtle' \
$ curl -i -H'Accept: text/turtle, application/ld+json' \
$ curl -I -H'Accept: application/ld+json' http://localhost:3000/inbox/
$ curl -I -H'Accept: text/turtle' http://localhost:3000/inbox/

# Location header in POST response
$ curl -i http://localhost:3000/inbox/abc
$ curl -i -H'Accept: application/ld+json' http://localhost:3000/inbox/abc
$ curl -i -H'Accept: text/turtle' http://localhost:3000/inbox/abc
$ curl -i -H'Accept: application/ld+json, text/turtle' \
$ curl -i -H'Accept: text/turtle, application/ld+json' \
$ curl -I http://localhost:3000/inbox/abc
$ curl -I -H'Accept: application/ld+json' http://localhost:3000/inbox/abc
$ curl -i -X OPTIONS -H'Accept: application/ld+json' \


  • SimpleRDF (MIT License) used for RDF
  • Express
  • and other node libraries for general plumbing


Apache License, Version 2.0

See the files LICENSE and NOTICE for required notices.

See also


How to contribute

  • Use it! Break things.
  • Report issues and document.
  • Fix issues.
  • Request new features.
  • .. and however else you want to contribute.